You are here: Re: Stopping 'Submit' by Return Key « HTML « IT news, forums, messages
Re: Stopping 'Submit' by Return Key

Posted by Jonathan N. Little on 12/11/05 03:35

Michael Winter wrote:

> On 10/12/2005 21:02, Ed Jay wrote:
>
> [snip]
>
>> I found the following script...
>>
>> var isNS =document.appName=="Netscape"?true:false;
>> var isIE =document.all?true:false;
>
>
> If you find other scripts that attempt to perform browser detection,
> move right along to the next one. Browser detection is unreliable, and
> any code that seems to depend on it is almost certainly badly written
> and should be avoided.
>
> As for your 'issue', take Jonathan's other suggestion: enforce
> completion if necessary with required fields. Users will /want/ to
> submit a form just by pressing <Enter> (I certainly do it all the time),
> and will think that something's wrong if nothing happens.
>
<snip>
If browser detection is needed I use object detection not by application.


var NN4x=typeof(document.layers)!='undefined';
var MSIE=typeof(document.all)!='undefined';
var DOM1=typeof(document.getElementById)!='undefined';

something like that, test for the object or functions existents is more
reliable.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

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

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