By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,689 Members | 1,915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,689 IT Pros & Developers. It's quick & easy.

enable/disable one alt stylesheet, how to?

P: n/a
Hi group. I have exactly one external, alternate stylesheet that I want
to enable or disable by form controls, on one page only (not saved
across pages).

I used:

<link rel="alternate stylesheet" id="style-compact" etc...>

<input name="view" type="radio"
onclick="document.getElementById('style-compact').disabled=false">

<input name="view" type="radio" checked="yes"
onclick="document.getElementById('style-compact').disabled=true">

Is this the best way to do it? I want to reference the alt-stylesheet by
name (or similar), not index.

It works in my Camino & Safari. In IE-Mac, I can enable the stylesheet,
but not (subsequently) disable it again -- parts of the page just
disappear.

Any advice? Thanks. M
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Manatee wrote on 11 jan 2005 in comp.lang.javascript:
Hi group. I have exactly one external, alternate stylesheet that I want
to enable or disable by form controls, on one page only (not saved
across pages).


<http://www.quirksmode.org/js/cssdisable.html>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.