File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to submit through a dropdown menu. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to submit through a dropdown menu." Watch "How to submit through a dropdown menu." New topic
Author

How to submit through a dropdown menu.

Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
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

Joined: Jan 10, 2002
Posts: 61764
    
  67

Some simple Javascript will do the trick.

Moved to the HTML/Javascript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Try something like:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to submit through a dropdown menu.