Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling another .do call on changing the value from Dropdown Box

 
andrew ronchi
Ranch Hand
Posts: 48
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a dropdown box in my struts application. onchange,i want to call another .do call with id of that selected value...?how cn i do that...
 
Alberto Dousdebes
Greenhorn
Posts: 22
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

You can call a JavaScript function in "onChange" event. This function retrieves the selected value and call any action you want:



And the javaScript function



Havent tested but it's an idea.

bye!
 
john lazeraski
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using a library like jQuery or Prototype? If so, you can set a click handler to call a JS function, which in turn makes an ajax request to the .do action.
 
andrew ronchi
Ranch Hand
Posts: 48
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot guys....it worked...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic