Page 1 of 1

Getting selection from dropdown

Posted: Tue Feb 16, 2010 2:07 pm
by JackD
All pages on our website have a header, a sidebar, and the mainform (body). In the sidebar, we need a dropdown such as:

Code: Select all

 
<form name="listselect" method="get">
<select name="List" id="NYT">
<option value=0>Hardback Fiction</option> 
<option value=1>Hardback Non-Fiction</option>
<option value=3>Paperback Fiction</option>
<option value=5>Paperback Non-Fiction</option>
</select>
</form> 
 
where the user can select an item from the list and we will display the selected items to match the user's choice. We do not want to refresh the entire page, and thus do not want to use "action='whatever.php'" in the <select> tag. We need to be notified the user has changed the selection in the dropdown, and the current value of "List" so we can display the proper items in the sidebar.

Is it possible to do this without going to javascript?

Re: Getting selection from dropdown

Posted: Tue Feb 16, 2010 2:10 pm
by John Cartwright
JackD wrote:Is it possible to do this without going to javascript?
Nope.

Moved to Javascript.

Re: Getting selection from dropdown

Posted: Tue Feb 16, 2010 3:11 pm
by JackD
Where is the javascript you move it to?
Thanks

Re: Getting selection from dropdown

Posted: Tue Feb 16, 2010 4:12 pm
by John Cartwright
JackD wrote:Where is the javascript you move it to?
Thanks
I moved this thread to the Javascript forum.