• 0

Submit to multiple forms at once?


Question

Ok, here's the scenario. I have already taken 3 programs, and setup the registration system to insert each bit of username in all three tables for members in the database each one with it's own prefix obviously and I've done this by submitting them all to php page that I have taken the other registration pages apart and put em all three together. Ok so that works fine creating a single user in all three databases.. no problem.

Although I want to make a login form to where I can submit it to each one of these other login submission pages for each unique program. Any idea on how to get a form to submit three times with one click?

Link to comment
https://www.neowin.net/forum/topic/360192-submit-to-multiple-forms-at-once/
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Quick Update: Here's what I'll need, but I'm very very unsure of how to do it.

I'll need to make "two" invisible forms.. (invisible input types)

I'll need some sort of javascript code that will change the variables automatically of these other forms.. does this make sense?

  • 0

Potentially you could get your server to do it for you using XmlHttp and a POST call, crafted for each different program.

If that isn't an option, then hidden iframes with the forms inside will do it.

Pseudo code:

var form=document.getElementById(iframeID).document.forms[0];

form.inputname.value=whatever;

rinse and repeat

form.submit();

repeat for each form, and THEN submit the original form.

  • 0

Which? hidden iframes or server side XMLHttp? I don't have any code samples...

iframes is less hassle to set up:

make a separate page for each registration form. Check that the page in and of itself works.

bung iframes into a master page, each iframe having a src of a particular reg form that you just made.

hide all but the master.

hook into the onsubmit handler for the form to populate the forms in the hidden iframes with any required data, submit those hidden iframe forms and then submit the main form.

Script for accessing across iframes is all over the place. Until you've got everything set up ensure the submission of the main form is always suppressed.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • Week One Done
      SmileWorks Dental earned a badge
      Week One Done
    • Community Regular
      vZeroG went up a rank
      Community Regular
    • Collaborator
      Snake Doc earned a badge
      Collaborator
    • Week One Done
      Snake Doc earned a badge
      Week One Done
    • One Month Later
      Johnny Mrkvička earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      582
    2. 2
      ATLien_0
      199
    3. 3
      Michael Scrip
      199
    4. 4
      +FloatingFatMan
      129
    5. 5
      Xenon
      125
  • Tell a friend

    Love Neowin? Tell a friend!