aspose file tools*
The moose likes Struts and the fly likes How to call Struts action from a javascript function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to call Struts action from a javascript function?" Watch "How to call Struts action from a javascript function?" New topic
Author

How to call Struts action from a javascript function?

rk sharma
Ranch Hand

Joined: Jun 25, 2011
Posts: 50

Here is the code for "somefile.jsp"



I am not able to get any action from the above code
when i put some alert to test it's working, but document.form_name.action = "/someAction.do"; line is not showing any effect.
Can anyone help me?

Regards,

RK
vikas byn
Ranch Hand

Joined: Mar 18, 2011
Posts: 80
use javascript like that -

document.forms[0].action = "/someAction.do";
document.forms[0].submit();
 
 
subject: How to call Struts action from a javascript function?