Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call Struts action from a javascript function?

 
Radhakrishna Sharma Gorenta
Ranch Hand
Posts: 63
Google App Engine Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use javascript like that -

document.forms[0].action = "/someAction.do";
document.forms[0].submit();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic