aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Can I access java class using Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can I access java class using Ajax" Watch "Can I access java class using Ajax" New topic
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: 61220
    
  66

You can use Ajax to hit a servlet to fetch whatever you need.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61220
    
  66

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I access java class using Ajax