Selacius Posted January 26, 2006 Share Posted January 26, 2006 Im looking for a script which will immediately display on the page the value of the selected option of a drop down list. Any clues? Link to comment Share on other sites More sharing options...
pulpfiction Posted January 26, 2006 Share Posted January 26, 2006 Try this....<script language="javascript">function test1(va){var opt = va.selectedIndex;var val = va.options[opt].value;document.write(val);}</script><SELECT name="opt" style="WIDTH: 200px" onchange="test1(this)"><OPTION value="option 1">option 1</OPTION><OPTION value="option 2">option 2</OPTION><OPTION value="option 3">option 3</OPTION><OPTION value="option 4">option 4</OPTION></SELECT> Link to comment Share on other sites More sharing options...
Selacius Posted January 27, 2006 Author Share Posted January 27, 2006 Now how can I make a javascript drop down list, so the option selected from the first list, will be the first option in a second list?? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now