D
drblitzkrieg
Hi,
Let's say you have a stylesheet linked in from the <head> section like
so:
<link id="ourlink" rel="bababooey stylesheet" type="text/css"
media="screen" href="style.css">
For when you need to dynamically swap the style out to another sheet,
or perhaps to a php file passing it parameters via get, you have it
like so:
var ourlink=document.getElementById("ourlink");
ourlink.href="othersheet.css";
//or:
ourlink.href="style.php?someVar=someVal";
In any case, it needs to change dynamically, because there might be
thousands of css's on the server and the user wouldn't be able to
download them all from the beginning.
I have tested this, and it works as expected in Mozilla/Firefox, but
not in IE. Does someone know the difference between the 2 browsers,
ie. does Firefox re-load from the server when the .href property's
value changes, but IE just sits there? Is there a way to wake IE up
and get it to do the same?
Thanks.
Let's say you have a stylesheet linked in from the <head> section like
so:
<link id="ourlink" rel="bababooey stylesheet" type="text/css"
media="screen" href="style.css">
For when you need to dynamically swap the style out to another sheet,
or perhaps to a php file passing it parameters via get, you have it
like so:
var ourlink=document.getElementById("ourlink");
ourlink.href="othersheet.css";
//or:
ourlink.href="style.php?someVar=someVal";
In any case, it needs to change dynamically, because there might be
thousands of css's on the server and the user wouldn't be able to
download them all from the beginning.
I have tested this, and it works as expected in Mozilla/Firefox, but
not in IE. Does someone know the difference between the 2 browsers,
ie. does Firefox re-load from the server when the .href property's
value changes, but IE just sits there? Is there a way to wake IE up
and get it to do the same?
Thanks.