submit two forms

Posted on 2005-05-09
Last Modified: 2010-04-09
hi all

I would like to submit a html form in silent mode whenever user click a button.
  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.

Question by:glogin
    1 Comment
    LVL 32

    Accepted Solution

    You can achieve it by implementing an hidden iframe which is the target of your first form


    <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.


    <script type="text/javascript">


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now