[thelist] Re: Cross-Browser

Matt Biscay mbiscay at skyminds.net
Wed Nov 21 08:28:15 CST 2001


Hi Banrett

Thank you very much !
It really helps me out...


-----
Matt Biscay
http://www.skyminds.net/


| Message: 23
| Reply-To: <emailus at carbonchip.com>
| From: "Carbon Chip" <emailus at carbonchip.com>
| To: <thelist at lists.evolt.org>
| Subject: RE: [thelist] Cross-Browser script
| Date: Tue, 20 Nov 2001 03:39:22 -0000
| charset="iso-8859-1"
| Reply-To: thelist at lists.evolt.org
|
| 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





More information about the thelist mailing list