PDA

View Full Version : Trying to get CSS switcher working on Moveable Type



Kupotek
06-03-2006, 12:58 AM
Here's what I've done so far. I was able to get this working on my main site but not on moveable type:


News site is: http://mews.kittysafe.net
Uploaded moveable type styles to root/mews/styles/
Uploaded styleswitch to /mews/

In main index template:
--------------------------------------------------------------------------


<head>
<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="beckett" href="<$MTBlogURL$>styles/beckett.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="folio" href="<$MTBlogURL$>styles/folio.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="forest_green" href="<$MTBlogURL$>styles/forest_green.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="sunburned" href="<$MTBlogURL$>styles/sunburned.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="tickle" href="<$MTBlogURL$>styles/tickle.css" />
<script src="<$MTBlogURL$>switcher.js" type="text/javascript">
/***********************************************
* Style Sheet Switcher v1.0- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
***********************************************/
</script>
<script type="text/javascript">
window.onload=function(){
var formref=document.getElementById("switchform")
indicateSelected(formref.choice)
}
var ie4 = false; if(document.all) { ie4 = true; }
function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }
function toggle(link, divId) { var lText = link.innerHTML; var d = getObject(divId);
if (lText == '+') { link.innerHTML = '-'; d.style.display = 'block'; }
else { link.innerHTML = '+'; d.style.display = 'none'; } }
</script>
</head>


In body:
--------------------------------------------------------------------------


<form id="switchform">
<select name="switchcontrol" size="1" onChange="chooseStyle(this.options[this.selectedIndex].value, 60)">
<option value="none" selected="selected">Blue Dream</option>
<option value="beckett">Beckett</option>
<option value="folio">Folio</option>
<option value="forest_green">Forest</option>
<option value="sunburned">Sunburned</option>
<option value="tickle">Tickle</option>
</select>
</form>


But it's not working?