submit two forms

hi all

I would like to submit a html form in silent mode whenever user click a button.
i.e.
  step 1: submit a html form silently, screen remain unchange but request has been
              passed to server side
  step 2: after step 1 is completed, submit another html form, with screen change
             (ie. forward to result screen)

How to achieve it? Pls suggest.

Thanks/GLOGIN
gloginAsked:
Who is Participating?
 
BatalfCommented:
You can achieve it by implementing an hidden iframe which is the target of your first form

example:

<form action="aPage.html" target="myIframe" method="post">


and the iframe

<iframe name="myIframe" style="display:none"></iframe>

Then from aPage.html, post the other form by javascript when the first form is finished it's submission.

example:

<script type="text/javascript">
parent.document.formNameNumber2.submit();
</script>

Batalf
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.