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 Link to comment https://forums.phpfreaks.com/topic/70263-javascript-list-boxes/ 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 Link to comment https://forums.phpfreaks.com/topic/70263-javascript-list-boxes/#findComment-353225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.