This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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


Win a copy of Building Microservices this week in the Design forum!
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: calling another .do call on changing the value from Dropdown Box
 
It's not a secret anymore!