Jump to content

cha0sunity

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by cha0sunity

  1. I'm new to programming in general and am attempting to learn java script. I've been searching the internet trying to find the answer to this and I can not. I've learned how to use a text input with a submit button to collect and use data from a user. I've been trying to get a dropdown menu <select> </select> to take data from a user with the submit button. I know how to make the menu and populate it, but not with an array yet. Can anyone give me some advice on how to make this work? the tutorials on this site have helped but I can not get a good result. <html><head> <title>Another Test</title><script type="text/javascript"> function checkYear(theYear){if (theYear == 1985){alert ("it works");}else{alert ("broken");}} </script> </head> <body> <form method="POST" name="yearForm" onSubmit="checkYear(document.yearForm.theYear);"><select name="theYear" id="idYear" value="year"><option value="1985">1985</option><option value="1986">1986</option></select> <input type="submit" name="submit" value="submit" /> </form> </body</html>
×
×
  • Create New...