beanymanuk Posted August 2, 2011 Share Posted August 2, 2011 I am trying to submit a form automatically using the below JavaScript it is working on one copy of site I have but not on another Form code here Then.... <script type="text/javascript"> document.paypal.submit(); </script> Any reason why this wouldn't be working? Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/ Share on other sites More sharing options...
trq Posted August 2, 2011 Share Posted August 2, 2011 Couldn't tell you without seeing your markup. Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250613 Share on other sites More sharing options...
beanymanuk Posted August 2, 2011 Author Share Posted August 2, 2011 <form action="?????" method="post" name="paypal"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="????"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="???"> <input type="hidden" name="country_code" value="GB" /> <input type="hidden" name="amount" value="?????" /> <input type="hidden" name="return" value="?????"> <input type="hidden" name="cancel_ return" value="????" /> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="login_email" value="????" /> <input type="hidden" name="first_name" value="???" /> <input type="hidden" name="last_name" value="???" /> <input type="hidden" name="country_code" value="GB" /> <input type="hidden" name="address1" value="???" /> <input type="hidden" name="address2" value="???" /> <input type="hidden" name="city" value="???" /> <input type="hidden" name="email" value="???" /> <input type="hidden" name="H_PhoneNumber" value="???" /> <input type="hidden" name="bn" value=???"> <!---<input type="submit" value="Submit" />---> </form> <div class="info_header"></div> <div class="info_holder"> <h2><img src="???" alt="" class="info_icon"/> Please Wait - now entering the secure payment area</h2> <p><img src="???" alt="" /></p> </div> <div class="info_footer"></div> <script type="text/javascript"> document.paypal.submit(); </script> Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250654 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 2, 2011 Share Posted August 2, 2011 <input type="hidden" name="bn" value=???"> value not started properly? Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250704 Share on other sites More sharing options...
beanymanuk Posted August 2, 2011 Author Share Posted August 2, 2011 Error bad I removed the " when copying into here and removing the value <input type="hidden" name="bn" value="????"> So thats not the cause Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250744 Share on other sites More sharing options...
Adam Posted August 2, 2011 Share Posted August 2, 2011 Are you getting a JavaScript error? Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250750 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 2, 2011 Share Posted August 2, 2011 <script> document.forms["paypal"].submit(); </script> Link to comment https://forums.phpfreaks.com/topic/243572-javascript-to-submit-form-automatically/#findComment-1250757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.