Win a copy of The Business Blockchain this week in the Cloud 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: 50
Eclipse IDE Java Tomcat Server
  • 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
  • Likes 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
  • 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: 50
Eclipse IDE Java Tomcat Server
  • 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