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

x
?
Solved

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

Posted on 2006-05-15
2
Medium Priority
?
194 Views
Last Modified: 2010-04-01
Hi

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.

Thanks

Ian
0
Comment
Question by:IanWood
2 Comments
 
LVL 11

Accepted Solution

by:
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
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20244148.html?query=dependent+drop+down+boxes&clearTAFilter=true

2) use server side roundtrip, following linke may help (without struts)
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20515222.html#7985354

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
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21754376.html
0
 

Author Comment

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

0

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