File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to submit through a dropdown menu.

 
Fritz Largosa
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • 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>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some simple Javascript will do the trick.

Moved to the HTML/Javascript forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic