|
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
[Back to original message]
|