struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paranoid_Fabio <paranoid_fa...@yahoo.it>
Subject Re: Invoking action method from javascript
Date Fri, 29 Feb 2008 15:48:55 GMT

Ok. Thank you. I will try this way.


Paranoid_Fabio wrote:
> 
> Hello. I've an action that populates a table with some info. In each row,
> there's a button to delete the entry and the associated object from the
> DB.
> In my action class I've a list (something like a queue) of the ID that
> will be removed after the user clicks on the "apply" button.
> So, all I want to do, is to add each element ID the user selects to the
> "remove-queue". When the user clicks on the remove icon, a javascript
> function is called:
> 
> the jsp snippet:
> 
> <td> ')" >
> 	 ../pages/Images/edit_remove.png </img>
>  </td>
> 
> the script inside the JSP.
> 
> <script type="text/javascript">
>  		 function addToRemoveList(id){
>   			
>   		 }
> </script>
> 
> The script is correctly invoked and the paramater ID is correctly passed.
> Now i would like to call a method of my action class and to refresh the
> page. Something like:
> 
> <script type="text/javascript">
>  		 function addToRemoveList(id){
> 
>   			myCurrentAction.addItemToRemove(id)
>                         
> 
>   		 }
> </script>
> 
> is it possible? thank you very much
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Invoking-action-method-from-javascript-tp15759459p15761284.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message