Skip to content
Advertisement

Automatically function for a form on webpage without click on button

Here is my code for going to the Paypal payment gateway for the item after a click on the “Buy Now” Button, But I want this function to be without even click on the “Buy Now” button, my meaning is when then webpage opened automatically go to the Paypal payment gateway without a click on “Buy Now” button. Is it possible? Any guidance will be very helpful.

JavaScript

Advertisement

Answer

U can achieve that by JavaScript:

JavaScript

EDIT: You could also submit the PayPal submit button instead of the form:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement