Apr 9, 2002 #1 Naits Programmer Joined Oct 10, 2001 Messages 90 Location NO How to get the value of the opention when the select changes in a form? __________________ Visit my homepage .: Game universE :. http://gameuniverse.eg.st
How to get the value of the opention when the select changes in a form? __________________ Visit my homepage .: Game universE :. http://gameuniverse.eg.st
Apr 9, 2002 #2 iTST Technical User Joined Apr 9, 2002 Messages 107 Location DE <html><head><title>Test</title> </head><body> <form name="Testform" action=""> Name: <input size="30" name="Name"> <input type="submit" name="Absendebutton" value="Absenden"> <input type="hidden" name="Browser" value=""> </form> <script type="text/javascript"> <!-- document.Testform.Browser.value = navigator.userAgent; document.write(document.Testform.Browser.value); //--> </script> </body></html> HTH cu, Sascha http://www.itst.org/ Upvote 0 Downvote
<html><head><title>Test</title> </head><body> <form name="Testform" action=""> Name: <input size="30" name="Name"> <input type="submit" name="Absendebutton" value="Absenden"> <input type="hidden" name="Browser" value=""> </form> <script type="text/javascript"> <!-- document.Testform.Browser.value = navigator.userAgent; document.write(document.Testform.Browser.value); //--> </script> </body></html> HTH cu, Sascha http://www.itst.org/
Apr 9, 2002 #3 iTST Technical User Joined Apr 9, 2002 Messages 107 Location DE Oops, posted the wrong example. Here we go: <html><head><title>Test</title> </head><body> <script type="text/javascript"> <!-- function selectChanged() { alter(document.Testform.Selection.value); } //--> </script> <form name="Testform" action=""> <select name="Selection" size="1" onChange="javascript:selectChanged();"> <option value="Opt1">Option 1</option> <option value="Opt2">Option 2</option> <option value="Opt3">Option 3</option> <option value="Opt4">Option 4</option> </select> </form> </body></html> again HTH cu, Sascha http://www.itst.org/ Upvote 0 Downvote
Oops, posted the wrong example. Here we go: <html><head><title>Test</title> </head><body> <script type="text/javascript"> <!-- function selectChanged() { alter(document.Testform.Selection.value); } //--> </script> <form name="Testform" action=""> <select name="Selection" size="1" onChange="javascript:selectChanged();"> <option value="Opt1">Option 1</option> <option value="Opt2">Option 2</option> <option value="Opt3">Option 3</option> <option value="Opt4">Option 4</option> </select> </form> </body></html> again HTH cu, Sascha http://www.itst.org/