Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call ProcessAction through Javascript?

 
Rena Ts.
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!


I need to submit a form without a submit button, through Javascript, in order for the ProcessAction method to be called.
I use this code inside the jsp:




but the processAction is never called. Is there a way to do this?

Thank you in advance.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rena Ts. wrote:Hello!


I need to submit a form without a submit button, through Javascript, in order for the ProcessAction method to be called.
I use this code inside the jsp:




but the processAction is never called. Is there a way to do this?

Thank you in advance.


document.myform.submit() will do exactly the same thing as a "submit" button in a form (myform in your case) will do.
I am suspicious if this function (postLoad()) is getting called at the "right" time - call this function on click of a button & verify... If that calls processAction() method then the issue is when & where to call your postLoad() function - HTML/JS forum will help you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic