drop down list/menu form submit

K

kevin

I was wondering using only javascript i am trying to figure this out. Lets
say i have a drop down menu with the following items in it\


<form id='frmitems' name='frmitems' method='post' action=''>
<select name='select'>
<option value='A'>Item A</option>
<option value='B'>Item B</option>
<option value='C'>Item C</option>
<option value='D'>Item D</option>
</select>
</form>


What i want to happen is when i select Item C it will submit the form and
Item C will be selected. This is going to be done by using javascript only.
Can somebody shed some light on this.


Thanks everybody in advanced who helped :
 
C

chonny

<form id='frmitems' name='frmitems' method='post' action='' >
<select name='select' onchange='document.frmitems.submit();'>
<option value='A'>Item A</option>
<option value='B'>Item B</option>
<option value='C'>Item C</option>
<option value='D'>Item D</option>
</select>
</form>
hope this help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top