Closed Thread Icon

Topic awaiting preservation: css on fly (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=8661" title="Pages that link to Topic awaiting preservation: css on fly (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: css on fly <span class="small">(Page 1 of 1)</span>\

 
jondoe
Obsessive-Compulsive (I) Inmate

From: UK
Insane since: May 2003

posted posted 05-20-2003 21:20

Try this...

------ HEAD ---------------------------------------

<link rel="stylesheet" href="style_1.css">
<link rel="stylesheet" href="style_2.css">
<link rel="stylesheet" href="style_3.css">
<link rel="stylesheet" href="style_4.css">
<link rel="stylesheet" href="style_1.css">


<script language="JavaScript">
<!--
var doAlerts=false;
function changeSheets(whichSheet){
whichSheet=whichSheet-1;
if(document.styleSheets){
var c = document.styleSheets.length;
if (doAlerts) alert('Change to Style '+(whichSheet+1));
for(var i=0;i<c;i++){
if(i!=whichSheet){
document.styleSheets[i].disabled=true;
}else{
document.styleSheets[i].disabled=false;
}
}
}
}
//-->
</script>

------- BODY ---------------------------------------

<a href="JavaScript:changeSheets(1)">Style One</a>
<a href="JavaScript:changeSheets(2)">Style Two</a>
<a href="JavaScript:changeSheets(3)">Style Three</a>
<a href="JavaScript:changeSheets(4)">Style Four</a>

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 05-20-2003 21:23

jondoe: Super thanks although we have kicked this issue around quite a bit before:

:FAQ: How do I change stylesheets dynamically?

As you are new here you might want to visit the reception room:

:FAQ: Reception Room

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu