[thelist] link rel disabled attribute

Mark Hadley mail at mark-hadley.freeserve.co.uk
Sun Feb 25 03:09:03 CST 2001


> ??? 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'

Well, that's the thing really, in NN4 (4.5PC) the disabled tag seems to work
initially, ie. it disables the stylesheet. I don't really want to turn it
on, because that groups NN4 nicely into the 'content only' bracket of
browsers and you don't get any half-baked rendering of your stylesheet. This
allows me to stream DOM, non-DOM browsers better as in the recent 'upgrade
your browser' discussions.

The most powerful aspect is the multiple stylesheet one, the browsers i've
tried seem to pre-load all of the shylesheets and then with a simple button
press,  the page re-renders with a new stylesheet. I'm working on a site
(can't show you i'm afraid!) that could possibly use this for accessibility
purposes, ie. a high contrast scheme etc.

> Sheesh yes! Fab. Would disabled="disabled" help it validate? It looks
> like you're using xhtml-style self-closing tags, so you'll need to
> specify an attribute for the property (ie, disabled="disabled") for
> it to validate.

Yeah, I've tried that, the W3C validator says that there are no known
properties called 'disabled' for anything!! I can live with it not
validating if i'm sure it'll work in a wide selection of browsers. And as
far as i'm concerned it should validate (or something similar!),

Mark.






More information about the thelist mailing list