jenniferG Posted September 22, 2007 Share Posted September 22, 2007 I need to set a var in Javascript that will give me the selected value of a list box from the listbox ID. ie: I have a list box with NAME="camera" and ID="camera" and I need to get the selected value so I can build a querystring for anAJAX query. Thanks, Natalie Quote Link to comment Share on other sites More sharing options...
mainewoods Posted September 23, 2007 Share Posted September 23, 2007 var selobj = document.getElementById('camera'); var camsel = selobj.options[selobj.selectedIndex].text; http://www.w3schools.com/htmldom/dom_obj_select.asp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.