Jump to content

JavaScript to submit form automatically


beanymanuk

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.