Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client-Side computations

 
bhuvan sundar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has to be done in Javascript.
Although Struts does provide some automatic javascript-generating functions, what you require is not one of them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic