File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!