VK wrote:[color=blue]
> Check that oStyleSheet.readOnly == true for IE (linked and imported
> rules can be viewed but not edited). Respectively any changes you apply
> on linked/imported rules are not reflected on the page and lost on
> reload.[/color]
This link states that rules will be dynamically applied to the current
page, and seems to be the case in my testing with IE6:
<url:
http://msdn.microsoft.com/library/de...node_entry.asp[color=blue]
>[/color]
They even have an example of it working.
[color=blue][color=green]
>>The following code works in FF, MZ, and IE6
>>var oStyleSheet = window.document.styleSheets[0]*.imports[0];
>>oStyleSheet.addRule("td","font*-size:1.2em;");[/color]
>
> Absolutely impossible: with IE6 for the reason stated above, with FF &
> MZ because of totally uncompatible syntacs.[/color]
But it does work in IE 6.
Anyhow, I've added some error checking (feature detection, whether
there's currently any stylesheet, import stylesheet, etc) and it seems
to be a way forward for me.
[color=blue]
> Also you may have a wrong idea about styles' allocation at runtime. All
> styles, from wherever they came from, are members of the
> document.styleSheets[0]. Inline, linked or imported rules just having
> different extra properties to sort them out if you need to. So very
> rarely you really need a "fully qualified path" to a rule.[/color]
I don't follow, surely if I'm going to add a rule I need somewhere to
add it to?
Andrew Poulos