| Author |
Can I access java class using Ajax
|
deshki raja
Greenhorn
Joined: Apr 03, 2009
Posts: 12
|
|
Hi,
I am trying to implement chain selecting in a page..ie, selecting one option in a checkbox or dropdown will populate the options in the next dropdown...as in selecting country will display states options......... The options in second dropdown is stored in a java class......can i access this java class and retrieve the list of options using ajax....can any one help me on this ?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56204
|
|
|
You can use Ajax to hit a servlet to fetch whatever you need.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56204
|
|
P.S. As I pointed out in this similar topic this is much easier with the assist of a library such as jQuery.
And, sample code is available. If you download the code for my jQuery book from its web page you'll find examples of creating dynamic dropdowns in the Chapter 8 sample code
You can see the sample code in action here.
|
 |
 |
|
|
subject: Can I access java class using Ajax
|
|
|