[thelist] link rel disabled attribute

Peter-Paul Koch gassinaumasis at hotmail.com
Sat Feb 24 20:03:48 CST 2001



>Does anyone know anything about the disabled attribute of the link tag. You
>can use it like this:
>
><link rel="stylesheet" type="text/css" href="a.css" id="style1" disabled />
>
>You can then set it to true or false using javascript i.e.
>
>if (document.getElementById){
>document.getElementById('style1').disabled=false;
>}

??? WHAT?! Wow, great discovery, I'd never heard of it before.

>I think it's an IE4 tag, but after some testing it seems to work in NN4,
>NN6, and IE5.5. I've been using it to switch stylesheets on and off, either
>multiple stylesheets, or as above to exclude the stylesheet for all 
>browsers
>except DOM compliant ones.

Question: how did you get it to work in NN4? 
document.layers['test'].disabled doesn't work: 'document.layers.test has no 
properties'

>It's really handy, i just wondered if anyone had come across any problems
>with this attribute? (btw, it doesn't validate!)

This is one of the greatest things I've seen in a long time. Yes, it is most 
definitely useful (you already use it yourself in a good way), and the worst 
problem would be that it doesn't work. Of course we'll have to find out in 
which browsers it does not work and devise a strategy for dealing with them, 
but those are details. Great to hear that this exists.

ppk

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the thelist mailing list