I am a PHP Newbie. I have a sample PHP form that submits to itself, when the value of a text field (containing an amount for a charitable donation) changes. At this point a random sequence number is generated and a time stamp captured. Along with an API login and "key", and MD5 call is made from these values to create a fingerprint. When the user presses the "submit" button after entering a dollar amount, then the page transmits the form to a payment processor's web site.
My problem is I need to prevent pressing the Enter key from submitting the form too early. Is it possible to suppress the default Enter key behavior in this form, without submitting to a PHP function? Or, is the best way to go to write a function?
Thanks.
cmn
Supressing Default Enter Key Behavior
Moderator: General Moderators
-
octopusgrabbus
- Forum Newbie
- Posts: 7
- Joined: Tue Jan 13, 2009 1:10 pm
Re: Supressing Default Enter Key Behavior
Something like this maybe:
http://www.cs.tut.fi/~jkorpela/forms/enter.html
http://www.cs.tut.fi/~jkorpela/forms/enter.html