...

View Full Version : Check my problem- experts!



codingmasta
12-23-2006, 07:56 AM
<script type="text/javascript" language="javascript">
if(navigator.appname = Microsoft Internet explorer)
document.write("Your currently used browser is IE")
if(navigator.appname = Mozila Firefox)
document.write("Your currently used browser is FF")
</script>

I am using IE 7 but still these are wrong. Help.

GJay
12-23-2006, 08:25 AM
test for equality with ==, and navigator.appname will give a string, so needs quotes.

gopi
12-23-2006, 12:37 PM
<script type="text/javascript">
alert(navigator.appName);
if(navigator.appName=='Microsoft Internet Explorer')
alert("you are using Internet Explorer");
else
alert("you are using Netscape");
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum