You are here: Re: Does anyone know why Safari browser does not submit on enter key. « HTML « IT news, forums, messages
Re: Does anyone know why Safari browser does not submit on enter key.

Posted by Edd on 12/20/05 21:50

zazzaron@cox.net wrote:
> Does anyone know why Safari browser does not submit on the enter key.
>
> Here's the asp page - its very simple. I click on the radio button then
> hit enter - no submit. If my focus is on a textbox all works fine.
>
> <HTML>
> <HEAD>
> <TITLE>enter test</TITLE>
> <script language="javascript">
> function validate()
> {
>
> alert('validate');
> return true;
> }
> </script>
>
> </HEAD>
> <form name="form1" id="form1" method="post" onSubmit="return
> validate()">
> <input type="radio" name="Amt" id="Amt">
> <font>Pay Total Amount</font>
> <input type="text" name="textfield2" size="12" >
> <input type="text" name="textfield1" size="12" >
> <input type="submit" id="xsubmit" name="xSubmit" value="Submit
> Payment">
> </form>
> </CENTER>
> </BODY>
> </HTML>
>

There's no action attribute on the form tag...this may be the answer.
Put action="somescript.asp" in <form>, and set your validate function to
return false to stop it trying to navigate there for the moment.

Since it's a validation function, I imagine you'll want it to return
false if there is a validation error, and return true (thus submitting
the form) if there isn't.

--
Edd

 

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

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