Hey i need some help in submitting one form to 3 different sources, i've got it working to submit to 2 but i can't get it to work to submit it to 3. Here's the code i'm using First Form <div id="div_form" name="div_form"> <form id="form1" name="form1" action="http://ebizac.com/ar/optin.php" method="post"> <input type="hidden" name="action" value="addlead"> <input type="hidden" name="member" value="3222"> <input type="hidden" name="auto" value="13206"> <input type="hidden" name="delauto" value=""> <input type="hidden" name="thankyou" value="http://www.google.co.uk"> <input type="hidden" name="resubsetting" value="Y"> Email: <input type="text" name="email" /><br /><br /> <div class="myButton"> <input name="Submit" value="" onclick="document.form2.form3.email.value = document.form1.email.value; document.form2.form3.submit(); setTimeout('document.form1.submit()',8000);" type="button" /> </div> </form> </div> Code (markup): Second Form <form id="form2" name="form2" accept-charset="utf-8" action="http://ebizac.com/ar/optin.php" method="post" target="iframe" style="display: none;"> <input type="hidden" name="action" value="addlead"> <input type="hidden" name="member" value="3222"> <input type="hidden" name="auto" value="13092"> <input name="email" type="text" /> </form> Code (markup): Third Form <form id="form3" name="form3" accept-charset="utf-8" action="http://ebizac.com/ar/optin.php" method="post" target="iframe" style="display: none;"> <input type="hidden" name="action" value="addlead"> <input type="hidden" name="member" value="3222"> <input type="hidden" name="auto" value="13089"> <input name="email" type="text" /> </form> Code (markup): Could anyone help me in solving this issue? Thanks, Chris
You can do it with jQuery by cloning each form and appending to a temporary iframe and then calling submit on the iframe form
Took a while for me to find some code but here it is in jQuery. var frmContents = $('#form1').clone(); $('#iframe').contents().find('html').html(frmContents); $('#iframe').contents().find('form').submit();"; Code (markup): You can do this for any number of forms on the same page, and just put a hidden iframe on the page. <iframe id="iframe" style="display:none"></iframe> Code (markup):