Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: open
I currently have:
<form name="MyForm" action="http://formmail.example.com/cgi-bin/formmail.cgi" method="POST">
<input type="button" value="Submit" onclick="if(CheckInput(this.form))this.form.submit()">
Paypal requires a different "action" cgi.
I hope this makes sense
Anyway, you could add a button that alters the form's action and than submits it:
onclick="this.form.action='paypal-url here'; this.form.submit();"
I've found out what my issue is. I'm trying to submit a form twice, once to PP, once to me.
As far as I can gather, I can't get this to work because of forms resetting, not getting confirmation back from PP etc.
So, what I have decided to do is this:
Post the purchase form to me as normal (with the fixes you have suggested) and then, on the "Thank you for your purchase" page, give the option to pay by PP.
Now, my question is (being a newbie to JS) how do I pass variables from the original form (say ClientName and TotalPrice) to the form on the redirect page?
Simple question, I'm sure, but I'm not coping with any of this very well.