Javascript related

Results 1 to 2 of 2

Thread: Javascript related

  1. #1
    Join Date
    Dec 1969

    Default Javascript related

    I have been trying to detect what browser I am using, using Javascript so that I can determine what CSS file to use...however in Netscape 4.7, when I use the code below, it dows not ouput the Javascript after the document.write(); writes the line to link to the CSS file, but the other Javascript is omitted..any ideas would be great? I have tried everything and I know it is the document.write() that is causing it because if I leave it out the rest of the Javascript is in the browser when I go to View Source. Thanks in advance<BR><BR>&#060;script language="Javascript"&#062;<BR>if (document.all) {<BR>;<BR> document.write(&#039&#060;LINK href="style_ie.css" rel=stylesheet type=text/css&#062;hello&#039);<BR> document.close();<BR> }<BR><BR>else {<BR> if (document.layers) {<BR>;<BR> document.write(&#039&#060;LINK href="style_ns.css" rel=stylesheet type=text/css&#062;&#039);<BR> document.close(); <BR> }<BR> }<BR><BR>Other javasript here will not be outputted <BR>

  2. #2
    Kasper Guest

    Default RE: Javascript related

    I suggest you use ASP for this question instead of javascript.<BR><BR>In the HTTP headers you can also see which browser your user has.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts