aspose file tools*
The moose likes Struts and the fly likes calling another .do call on changing the value from Dropdown Box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "calling another .do call on changing the value from Dropdown Box" Watch "calling another .do call on changing the value from Dropdown Box" New topic
Author

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

andrew ronchi
Ranch Hand

Joined: Nov 03, 2011
Posts: 48

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

Joined: Sep 02, 2008
Posts: 22
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

Joined: Nov 14, 2011
Posts: 76
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

Joined: Nov 03, 2011
Posts: 48

thanks a lot guys....it worked...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling another .do call on changing the value from Dropdown Box