showing ... for netscape, show .... for ie
I am wondering if there is any script out there that will let me put something like:
< if netscape then show >
12345
< end netscape >
< if internet explorer/other show>
54321
Any help would be greatly appreciated.
Travis
Eboarding.net
AndyB posted this at 17:48 — 29th July 2000.
They have: 344 posts
Joined: Aug 1999
You should be able to work out your own revision to this one:)
<script>
/*Displaying a user's browser type script
By Website Abstration (wsabstract.com)
Over 200+ free scripts here!
*/
if (document.all)
var version=/MSIE \d+.\d+/
if (!document.all)
document.write("You are using "+navigator.appName+" "+navigator.userAgent)
else
document.write("You are using "+navigator.appName+" "+navigator.appVersion.match(version))
</script>
tazman posted this at 22:21 — 31st July 2000.
They have: 99 posts
Joined: May 1999
function get_browser_version_one(){
var browserName=navigator.appName;
var browserVer=parseFloat(navigator.appVersion);
if (browserName=="Netscape"){
document.form2.hdnBrowserType.value="N";
}else if(browserName=="Microsoft Internet Explorer"){
document.form2.hdnBrowserType.value="IE";
}else{
document.form2.hdnBrowserType.value="O";
}
}
--Then, when you wish to know what to display, just refer to the hidden field.
You could just as well do a document.write based on the above code.
Regards,
Tazman
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.