This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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


Win a copy of Head First Android this week in the Android forum!
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: 61

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,

Radhakrishna
vikas byn
Ranch Hand

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

document.forms[0].action = "/someAction.do";
document.forms[0].submit();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call Struts action from a javascript function?
 
It's not a secret anymore!