Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting a form using onclick

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I've got a page called testsubmit.asp that has the following 8 lines of code in it. The idea is that when you select something from the drop down menu it then displays that choice below it without the user having to click a submit button.

This code works on IE6 but on IE7 the value that is passed is always 1 regardless of what choice you make. Where am I going wrong?

Thanks very much

Ed

<form method="post" action="testsubmit.asp">
<select name="choice" onclick="submit()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</form>
<% = Request.Form("choice") %>
 
Use onchange method rather than onclick.

Cheers

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top