Re: determining browser then performing function

by =?iso-8859-1?Q?Josu=E9_Figueira_Machado?= <jmachado(at)mindspring.com>

 Date:  Thu, 22 Feb 2001 08:04:28 -0500
 To:  "Mike Dahlor" <mdahlor(at)bebsoft.com>,
"hwg-techniques List" <hwg-techniques(at)hwg.org>
 References:  smginc mike98
  todo: View Thread, Original
How about this (assuming that your function has already been defined):

<script type="text/javascript">
    if (document.layers)  {
        popupWin();
        }
</script>

HTH,

Josu�




----- Original Message -----
> A little quest I am on if I may intrude.  I have the following script
> (received from this gracious list) that helped me see the browser and call
> the appropriate style sheet.  I would like the same ability to call a
> function.  In a nut shell, if netscape do this "function popupWin() {" if
> not then ignore it.  Can the below script be altered to do that or does
> anyone have another handy that can do the job?  Thanks!
>
> <SCRIPT>
> if (document.layers) //If Netscape
> {
> document.write("<LINK REL='stylesheet' TYPE='text/css'
> HREF='../scripts/nsbody.css'>");
> }
> else if (document.all) //IE 4 & 5
> {
> document.write("<LINK REL='stylesheet' TYPE='text/css'
> HREF='../scripts/iebody.css'>");
> }
> </SCRIPT>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA