netscape + dynamically assigned stylesheet definitions?

liunx

Guest
Hello there,
I am trying to make a browser/screen friendly javascript application.
I want my program to work like this:

1)program determines which browser is the user using and redirects him to specified site. (explorer vs. netscape)

2)On this site, there is a stylesheet definition (external file) and script that determines user's screen resolution and accordingly changes the stylesheet's definition.
<link rel="stylesheet" type="text/css" href=http://www.webdeveloper.com/forum/archive/index.php/"" id="style" /> is the definition.

3)The script uses this construction: style.href=http://www.webdeveloper.com/forum/archive/index.php/"aaa.css". This seems to work flawlessly in IE, but does not work in Netscape. I wonder if there is a way how to accomplish this.

(I know there is a way...make different XHTML file for each resolution, but that somehow does not attract me...)

Therefore, I was wondering if you could help me with this!

PS:sorry for English related mistakes!You did not specify what version of Netscape. It sounds like you are trying to make this work on NS 4. If so, I would suggest that you make the LINK point to the Netscape file and if you detect IE, then change the style.href.
 
Back
Top