Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submitting multiple forms in the same call

    Hi!
    I have a web page with several different forms in it. On certain occations, I would like to submit more than one of these forms. Something like this:


    Code:
    function submit_forms(){
    document[formName0].submit();
    document[formName1].submit();
    document[formName2].submit();
    etc...
    }
    This doesn't seem to work, neither in IExplorer nor FireFox. Only the last submit gets through, in the framework that I am running. Which other options are there, apart from merging all the forms into one big form?

    thank you!

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    This is not possible - you can only submit one form at a time.

    Sorry!

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper

  • #3
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    Because the form action is same

  • #4
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This works for IE. Not sure for any other browser. Please let me know if you find out.

    <script>
    function submitallforms() {
    setTimeout('document.forms[0].submit()',100);
    setTimeout('document.forms[1].submit()',200);
    setTimeout('document.forms[2].submit()',300);
    }
    // End -->
    </script>

    <input type=button value="Submit" onclick="submitallforms();">

    Napoleon N. Valdez
    Senior Web Database Developer
    Caspio, Inc.
    Toll-free: (877) 820-9100 ext. 703
    Local or International: +1.408.970.0500 ext. 703
    Fax: 1.408.516.9925
    Email: nvaldez@caspio.com
    http://www.caspio.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •