[thelist] Global CSS changes onClick
James Spahr
james at designframe.com
Mon Jul 31 20:25:36 CDT 2000
on 7/31/00 8:52 PM, i at isaac at members.evolt.org wrote:
>>> I'm putting together a wee photo album, and I'm doing
>>> a printable version.
>>
>> i don't get what you mean by that... have the *classes* change, or
>> have the *tags* change?
>
> I think that Martin is wondering if it's possible to change the CSS or
> stylesheet link onClick. ie, without reloading the page as
> template.blah?printable=fuckyeah. Click a link, and the background goes white,
> text goes dark, and navigation disappears or something.
>
> Personally, I doubt that it's possible (and if so, you can bet that it'd be IE
> only)...
>
> Anyone else?
Its doable, but you'll need to set each CSS property in the corresponding
Javascript DOM object. You can't just say 'use the .printable' version
document.body.bgcolor = "#ffffff";
loop throught the p[] arrary, and set all those, etc.
I've set bgcolors in tables dynamically in js on both IE and NN -> without
testing, I'm not sure you can do the body - but I'd say give it try.
James.
More information about the thelist
mailing list