detecting broswer

lordsofvine

New Member
Messages
41
Reaction score
0
Points
0
i got a problem in my website, the format does not meet the compatibility of the IE, actually i run my website in the firefox and what should i do or could anyone know how to make a calling statement or like for example, if the browser is firefox then the code is like these and when the browser is IE the code is like these, so does anyone know how or what to do, thanks for anyone who trys to help, thank you...
 

mujtaba91

New Member
Messages
50
Reaction score
0
Points
0
Use the following conditional statement:
Also u can change IE 6 to IE 7 , IE 8 etc...

<!--[if IE 6]>

<!--Internal stylesheet or external stylesheet goes here-->

<link rel="stylesheet" type="text/css" href="iespecific.css" />

<![endif]-->
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
HTML:
<script language="JavaScript" type="text/JavaScript">
 if(navigator.appName == "WebTV")
{
 alert("You're using the WebTV browser.")
}
 if(navigator.appName == "Netscape")
{
 alert("You're using a Netscape browser.")
}
 if(navigator.appName == "Microsoft Internet Explorer")
{
 alert("You're using the Internet Explorer browser.")
}
</script>
HTML:
<script type="text/javascript">
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);

document.write("Browser name: "+ browser);
document.write("<br />");
document.write("Browser version: "+ version);
</script>
You can use them, but I recommend the last one => Javascript Browser Sniffer
 
Top