This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Client-Side computations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Client-Side computations" Watch "Client-Side computations" New topic
Author

Client-Side computations

bhuvan sundar
Ranch Hand

Joined: Mar 02, 2005
Posts: 104
Hi!!

I'm developing an application using Struts. In my jsp, i've two dropdown boxes. On selecting a value from the 1st dropdown, the values corresponding to that should be displayed in the second drop down.

I don't want to fetch the values of the second dropdown each time from the backend. Is there any way to do this in the client-side itself, particularly, using Struts.

Thanks in advance.....
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I am not sure if there is a way of doing this in struts, but I would recommend looking into using javascript. This would eliminate the round trip from the server to the client. The manipulation of the 2 drop down boxes would be done on the client side.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

This has to be done in Javascript.
Although Struts does provide some automatic javascript-generating functions, what you require is not one of them.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client-Side computations