aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Retain Drop Down menu values on Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Retain Drop Down menu values on "Back"" Watch "Retain Drop Down menu values on "Back"" New topic
Author

Retain Drop Down menu values on "Back"

Ravi Pat
Greenhorn

Joined: Oct 04, 2004
Posts: 15
Hello all,
I'm using javascript in a JSP which uses the onchange() function to populate 4 drop down boxes that are linked. Based on the options selected in the JSP a graphic is created. Now when I go back to the JSP, I want all the options selected on the form to be retained. However the Drop Down menus do not retain their values. Please help!

I don't quite get whats explained in http://www.coderanch.com/t/112616/HTML-JavaScript/retaining-form-field-after-submission
thanks in advance
ravi
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you need the browser to remmeber the values, either you need to use a cookie on the client side, or you need to capture them on the server side.

Eric
Ravi Pat
Greenhorn

Joined: Oct 04, 2004
Posts: 15
Can you suggest a place where I might find some example code.
thanks..
ravi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retain Drop Down menu values on "Back"
 
Similar Threads
Javascript functions
help on html: options
Drop-down: How can I make the list bigger than the drop down
How to retain the value of drop down on click of browser back button
Retaining List Values After Validating - Is there a way?