Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Client-Side computations" Watch "Client-Side computations" New topic

Client-Side computations

bhuvan sundar
Ranch Hand

Joined: Mar 02, 2005
Posts: 104

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

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:
subject: Client-Side computations