This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons 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: 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();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call Struts action from a javascript function?
 
Similar Threads
document.getElementById("id").value is not supported in firefox
javascript function
Internationalization login thru to...
Problem with struts-menu for second level submenu
form submission