• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to determine which button/menu cause a submit

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two menus which autosubmits a form whenever the user selects an item. I want an if statement which determines which menu submited the form. I do now know how to implement this one though. If you know some way to do this please let me know. Thanks...


--------------------------------------------------------
<select name="Menu1" onchange ="document.form3.submit()">
<%
if(request.getParameter("select2").equals("2")){
out.println(" <option>2</option> <option>1</option>");

}//if
else{
out.println(" <option>1</option> <option>2</option>");
}//else

%>

</select>

<select name="Menu2" onchange ="document.form3.submit()">

</select>

--problem code below. I do now know how to implement the code below--
<%
if(Menu1 submited the form)
do this

if(Menu2 submited the form)
do this

%>
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use a hidden input type to determine who submits...

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic