• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to submit through a dropdown menu.

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently I have a dropdown menu and a submit button. After the user selects an item the user then clicks on submit botton which submits the results to Page2.jsp which processes it.

What I want is for the user to skip clicking the submit button and instead the page will auto submit whenever the user selects an item on the dropdown menu. Basically I do not want a submit botton but instead want the page to submit whenever the user selects an item from the dropdown menu.

I currently do not know how to implement this, if anybody knows how please help. Thanks.

My code
------------------------------------------------------------------------
<form name="form3" method="post" action = "http://localhost:8080/Page2.jsp">

<select name="select">
<%...Here is a JSP code which will populate my dropdown menu from the DB...%>

//after the user selects an item from the menu
//action = "http://localhost:8080/Page2.jsp" should be performed.

</select>

</form>

</body>
</html>
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some simple Javascript will do the trick.

Moved to the HTML/Javascript forum.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try something like:

 
Are we home yet? Wait, did we forget the tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic