aspose file tools*
The moose likes JSP and the fly likes dynamical page content refreshing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "dynamical page content refreshing" Watch "dynamical page content refreshing" New topic
Author

dynamical page content refreshing

Steve Mutanson
Ranch Hand

Joined: Apr 15, 2003
Posts: 67
In my JSp page, suppose I have a radio buttons section ("product type") followed by a picklist section ("Product Name"). I want the content of the "product name" be dependent upon "product type", i.e. I want to retrieve the "product name" from database based on what "product type" user picks and then dynamically display them in the picklist after product type is picked.
I know if I put a "submit" button right after the "product type" section it should work. But this makes it cumbersome because I will neded several submit buttons if I want the page to be totally dynamically refreshable (one section be dependent on its preceding section(s)).
Is there better way to do this without puting "submit" buttons next to EACH component and having to click each one to refresh ?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You can use JavaScript's onChange() function for reloading the page when any of the input elements' selections are changed. Check out the HTML/JavaScript forum(s) for details.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamical page content refreshing
 
Similar Threads
dynamic page change
What can I do to pre-select something ?
Dynamically include and show what's been selected in the last page
What can I do to pre-select something from database?
jsp form with two submit button