You are here: Re: How to submit a form when user presses Enter key « PHP Programming Language « IT news, forums, messages
Re: How to submit a form when user presses Enter key

Posted by Richard on 10/07/27 12:00

"Daniel Klein" <danielk@featherbrain.net> wrote in message
news:g91qo3tkqqv777bd6elc5ercea91iddl7r@4ax.com...
> On Tue, 15 Jan 2008 20:07:29 +0100, "Richard" <root@localhost>
> wrote:
>
>>
>>"Daniel Klein" <danielk@featherbrain.net> wrote in message
>>news:ts0qo3p6i33dh14e9aoookeldba13g1g3h@4ax.com...
>>> I'm pretty new at php and web stuff so please be gentle with me.
>>>
>>> I'm trying to get a form to submit when the user presses the Enter
>>> key. I do not want to use javascript. I've googled this to death
>>> and
>>> cant find the answer (only hints), except on the 'Experts Exhange'
>>> page and you have to pay to get the answer :-(
>>>
>>> Why is this such a secret in the open source world we live in?
>>>
>>> Daniel Klein
>>
>>Hi,
>>If you have a form with a submit button, then ENTER will submit the
>>form as far as I know.
>>Not sure about all OS-en or browsers BTW.
>
> Here is a extremely simplified example:
>
> <html>
> <body>
> <h1>Test Page</h1>
> <form action=test.php method="get">
> <input type="submit" value="Submit">
> </form>
> </body>
> </html>
>
> So there is one 'submit' button. It appears that the button has to
> be
> in focus in order for the user to be able to submit the form with
> the
> Enter key. What am I missing? Is this even possible?
>
> [ And let's not start another thread on Get vs Post :-) ]
>
> Daniel Klein

I think its enough for the form to have the focus (if there is such a
thing).
If you add a text input, and type something in there, then try the
ENTER key.
What is a form without fields?
:)
Richard.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация