wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Dynamically updaing JSP Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamically updaing JSP Form" Watch "Dynamically updaing JSP Form" New topic
Author

Dynamically updaing JSP Form

Vinay
Greenhorn

Joined: Feb 03, 2002
Posts: 1
Dear All,
In the following situation your help is highly appreciated.
A form contains various select fields. Depending on users login first <select> is populated. When user selets any value in the first <select>, second <select> is populated. And third <select> is populated based on second <select>. All these values are dynamic i.e. coming from DB. I dont' want to submit the form every time user selects value. Is there any way using javascript I can handle this.
Thanking you all in anticipation.
kind regards,
Vinay
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60788
    
  65

Sure, you could load up the page with all the possible values in Javascript variables, and when various select options are selected, use Javascript to modify the options of the other select elements.
However, this entails you uploading all the possible values with every page load. This may not be practical.
If you need to go back to the server for the data, but don't want the page to refresh, one trick could be to post the server hits to an invisible iframe whose response can contain Javascript that can modify the select elements as appropriate.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamically updaing JSP Form
 
Similar Threads
Please solve the problem.
Drop Downs
Populating one drop down based on the other
problem in including jsp file dynamically
How to Validate more then one selection list?