Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-19-2004, 05:33 PM   PM User | #1
florida
Regular Coder

 
Join Date: Jul 2002
Posts: 362
Thanks: 0
Thanked 0 Times in 0 Posts
florida is an unknown quantity at this point
Display browser info

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:

Code:
<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???
florida is offline   Reply With Quote
Old 08-19-2004, 06:53 PM   PM User | #2
requestcode
Regular Coder

 
Join Date: Jun 2002
Posts: 626
Thanks: 0
Thanked 0 Times in 0 Posts
requestcode is an unknown quantity at this point
Check this link out for some examples:
http://www.javascriptkit.com/script/cutindex8.shtml
requestcode is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:42 AM.


Advertisement
Log in to turn off these ads.