This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read XML file-->listDropdown

 
renu richard
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have three dropdown boxes in a JSP. The values to be populated in the drop down list are available in the XML file. Once the value is selected in th first drop down list, it has to display the the correspoding values in the second box after reading the mapped values from the XML and so on.
Can anyone tell me how can i achieve this.
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use XML Parsers to get the lists and show in drop donw list and for loading another drop down lists use Ajax.

Let me know if im not clear

Regards,
Bhagavan R
 
renu richard
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajani,
I am familiar with JSP's. But i dont know anything about AJAX. Could you please refer me to any URL's where i could see similar kind of sample code or where i can learn aout AJAX. Also is it not possible to achieve this functionality with javascript alone.(not using AJAX)
[ December 09, 2008: Message edited by: renu richard ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by renu richard:
Rajani,
I am familiar with JSP's. But i dont know anything about AJAX. Could you please refer me to any URL's where i could see similar kind of sample code or where i can learn aout AJAX.

Start with this article to learn how Ajax works. Then adopt a library such as jQuery or Prototype to do your Ajax for you.

Also is it not possible to achieve this functionality with javascript alone.(not using AJAX)
Not unless you preload all possible values on the page in JavaScript variables in advance.
 
Veera Sundar
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by renu richard:
Rajani,
I am familiar with JSP's. But i dont know anything about AJAX. Could you please refer me to any URL's where i could see similar kind of sample code or where i can learn aout AJAX.
[ December 09, 2008: Message edited by: renu richard ]


I hope this one Implementing Ajax in Java web application using JQuery helps.
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes , with out Ajax also you can implement it.The only problem is you need to submit the entair form to the server.Just call another action if any one selects one item from first dropdown list.

If you want any simple ajax example please gothrough the following link
http://www.w3schools.com/ajax/default.asp

But this is for beginers....

Regards,
Rajani
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic