Jump to content

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> 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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