Hi everyone!
I was trying to add an alternate stylesheet to my page, so I (or the User) could change between main and this one. The only problem is-- the browsers doesn't seem to see them! When I list the styles for the page in Firefox, there's only main one listed, so the whole switch machinery simply won't work; the same story's for Opera. What is interesting, it does work well with Safari! (And Dreamweaver...)
Here's some of the code, I'm using:
Code:
<link href="main.css" rel="stylesheet" type="text/css" id="default" />
<link href="braz.css" rel="alternate stylesheet" type="text/css" id="alternate" />
<a href="#" onclick="changeStyle()">style sheet</a>
and for changing the styles:
Code:
function changeStyle() {
document.getElementById('default').disabled=true;
document.getElementById('alternate').disabled=false;
}
I know the alternate stylesheet is disabled by default, but even when I add disabled="disabled" to second <link>, it still won't work... Where's the error?
ps.
Here's the "live" page, if you're interested:
http://misiu98.republika.pl/willa
(ignore the background-only change, it's for testing purposes only; also ignore IE issues-- I hope I can solve them when I get the whole site working)
__________________
Please login or register to view this content. Registration is FREE
home of senemedar
|