• 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
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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

    • No registered users viewing this page.