Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

style switcher

0 views
Skip to first unread message

lee

unread,
Oct 21, 2002, 4:59:20 PM10/21/02
to
I have a site at: http://www.whatsoninvaleroyal.org.uk that uses Java Script
to switch style sheets.

The thing is I have six external style sheets and I can only get four of
them to switch. The site works fine on the hard drive but I have this glitch
remotely.

Any ideas, is the problem the links to the sheets, the JS or a server
problem?

Marc el XrV

unread,
Oct 22, 2002, 10:24:45 AM10/22/02
to
i don't see u'r js code but i recommend to u to test my code and compare

<link href="css1.css" rel="stylesheet" type="text/css">
<link href="css2.css" rel="stylesheet" type="text/css">
<link href="css3.css" rel="stylesheet" type="text/css">

<script>
//pequeño script por Marc Palau (www.palaueb.com).
function champinyon(nsui) {
for(x=0;x<document.styleSheets.length;x++){
if(nsui == x){
document.styleSheets[x].disabled=false;
}else{
document.styleSheets[x].disabled=true;
}
}
}

where nsui is the number of the css u want to use.
4xmp:

<input type="button" onclick="champinyon(0)" value="ESTILO 1"
style="background='#FF0000';color='#000000'">
<input type="button" onclick="champinyon(1)" value="ESTILO 2"
style="background='#0000FF';color='#00FFFF'">
<input type="button" onclick="champinyon(2)" value="ESTILO 3"
style="background='#000000';color='#FFFFFF'">


--
att. Marc Palaueb
http://www.favoritos.org
http://www.palaueb.com


"lee" <leedri...@hotmail.com> escribió en el mensaje
news:ap1p73$pmt$1...@news5.svr.pol.co.uk...

0 new messages