[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Refreshing page/data values on data change in a JSP.

Posted on 2006-05-15
Medium Priority
Last Modified: 2010-04-01

I've got a JSP that retrieves data using JDBC.  I want the options presented in select boxes to change depending what has previously been selected.  I.e. the selections for the 2nd input are generated by a sql query containing the 1st input.   Is this possible?    Some sample code would be great.

I tried a web search, is it anthing to do with AJAX?  Sounds a bit complicated to me.


Question by:IanWood
LVL 11

Accepted Solution

fargo earned 1000 total points
ID: 16689051

following are the options for you

1) use plain javascript and populate the js arrays with the dependent dropdown entries

2) use server side roundtrip, following linke may help (without struts)

3) use server side roundtrip, following linke may help (with struts)
have action class handle the server round trip based on parameter and provide the content of dependent drop down boxes to view

4) if u wish to use AJAX and with struts

Author Comment

ID: 16697589
The server side round trip has done the trick.  Cheers.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tech giants such as Amazon and Google have sold Alexa and Echo to such an extent that they have become household names. And soon they are expected to be used by commoners in their homes, ordering takeout, picking out a song, answering trivia questio…
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question