[thelist] Cross-Browser script
Carbon Chip
emailus at carbonchip.com
Mon Nov 19 21:37:50 CST 2001
matt
i have one that i pulled together for CSS selection based on browser type.
only identifies IE/NS underWin/Mac at mo, but code is rudimentary enough to
be extensible to all OS's/platforms/browsers.
it can pull some neat tricks, ie pull some great effects in IE4++, and then
leave out any conflicting stuff that plagues NS and Opera.
sample as:
<script language="JavaScript">
<!--
function checkbrowser() {
appVer=navigator.appVersion.toLowerCase();appNum=navigator.appVersion.substr
ing(0,1);appName=navigator.appName;var compName="";if
(appVer.indexOf("win")!=-1) {compName="Win";} else if
(appVer.indexOf("mac")!=-1) {compName="Mac";} else {compName="?";}
if (appName=="Netscape" && appNum>=4 && compName=="Win")
{document.write("<link type='text/css' href='css/aiwinnn7.css'
rel='stylesheet'>");}
else if (appName=="Netscape" && appNum>=4 && compName=="Mac")
{document.write("<link type='text/css' href='css/aimacnn7.css'
rel='stylesheet'>");}
else if (appName=="Microsoft Internet Explorer" && appNum>=4 &&
compName=="Win") {document.write("<link type='text/css'
href='css/aiwinie7.css' rel='stylesheet'>");}
else if (appName=="Microsoft Internet Explorer" && appNum>=4 &&
compName=="Mac") {document.write("<link type='text/css'
href='css/aimacie7.css' rel='stylesheet'>");}
else {
}
}
// -->
</script>
used at: www.approvedinternet.com
hope this is of some help.
banrett
banrett at carbonchip.com
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Matt Biscay
Sent: 19 November 2001 22:48
To: thelist at lists.evolt.org
Subject: [thelist] Cross-Browser script
Hi everyone,
I have a problem with finding a correct cross browser script that will
display my pages correctly in both IE and Opera (i did not check Nestcape).
I had written a script in php and the display was great but some search
engines seem to get confused.
Do you have any ideas ? I heard there was some possibility in Javascript but
I want to use a single page (no redirects to several pages).
Thanks a lot,
-----
Matt Biscay
http://www.skyminds.net/
---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list