Re: enter key?

From: Date: Thu, 17 Jan 2002 17:43:33 +0000
Subject: Re: enter key?
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-15943@lists.php.net to get a copy of this message
On Friday 18 January 2002 01:30, James Kupernik wrote: > Sorry about that .... > > <?php > > if ($submit) { This is probably where your problem is. Which browser are you using? To fix this you could include a hidden element in your form and check for this rather than checking for "submit". > > You cannot rely the behaviour of hitting enter to submit a form. In IE & > > NN > > > pressing enter to submit a form results in the value for the submit > > button NOT being sent. So clicking on the submit button to submit a form > > is not > > the > > > same as pressing enter to submit the form. Thus if you were relying on > > the value of the submit button your code wouldn't work. > > > > AFAIK Opera does the 'right' thing and sends everything when you press > > enter > > > to submit the form. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* The sweeter the apple, the blacker the core -- Scratch a lover and find a foe! -- Dorothy Parker, "Ballad of a Great Weariness" */

« previous php.db (#15943) next »