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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Action on Selected Pulldown

Status
Not open for further replies.

dinoviapangea

Technical User
Apr 9, 2002
41
US
I have a pulldown menu as below,

<Form Name="Top_Page" Action="Next_Page" Method="Post">

<Select name="item_id">
<OPTION Value = "1" >#item_1_name#
<OPTION Value = "2" >#item_2_name#
<OPTION Value = "3" >#item_3_name#
</Select >

</Form>

How can I have the form submit when a user selects from the pulldown?

Thanks,
Dino
 
this is a javascript question. forum216

however since its easy to answer....

<Select name="item_id" onchange = "document.formname.submit();">

change "formname" with the name of your form.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Nothing happens. I'm wondering if the .cfm in "document.Next_Page.cfm.submit();" is affecting it.

<Form Name="Top_Page" Action="Next_Page.cfm" Method="Post">

<Select name="item_id" onchange="document.Next_Page.cfm.submit();">
<OPTION Value = "1" >#item_1_name#
<OPTION Value = "2" >#item_2_name#
<OPTION Value = "3" >#item_3_name#
</Select >

</Form>
 
form name. not page name.

i.e.
<form name = "FORMNAME">

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top