Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser selection Pop up windows

Status
Not open for further replies.

Gwen21

Programmer
Apr 5, 2002
16
US
I need some help I have an intro page that has a link and when the user clicks it I want it to check the browser version then open a certain window depending on the browser they are using . I have this code that finds the browser type is there a way to change this to get what I am looking for. I have tried many things and just can't seem to get it.

<html>

<head>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=iso-8859-1&quot;>
<title>DHTML for the Detecting the Browser Name and Version</title>
</head>
<body>
<script>
document.write('<b>This browser\'s designation is:</b> ');
document.write(navigator.appName + ' ');
document.write(navigator.appVersion);

var isNS = 0;
var isIE = 0;
var isOtherBrower = 0;

if (navigator.appName.indexOf('Netscape') != -1) {isNS = 1;}
else {
if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1) {isIE = 1;}
else {isOtherBrow = 1;}
}

browserVersion = parseInt(navigator.appVersion);

document.write('<br><br>');
if (isNS) {document.write('This Browser is compatible with Netscape version ');}
else {
if (isIE) {document.open pop.htm;}
else {
if (isOtherBrowser) {document.write('I do not recognize this browser type. Version = ');}
}}
document.write(browserVersion +'.');
</script>
</body>

</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top