...

View Full Version : Display browser info



florida
08-19-2004, 06:33 PM
I would like to make an alert come up on a page when it first comes up where it tells the name of the browser that is being used:



<script>
function BrowserAlert()
{
ns4=document.layers;
ie=document.element;
if(ns4)
{
alert("You are using Netscape 4.");
{
else if(ie)
{
alert("You are using IE.");
}
else
{
alert("You are using Netscape 7.");
}
}
</script>

......
<html>
<body onload="return BrowserAlert();">



Please advise if I am doing this correctly???

requestcode
08-19-2004, 07:53 PM
Check this link out for some examples:
http://www.javascriptkit.com/script/cutindex8.shtml



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum