oppeneer
10-11-2008, 12:47 AM
1) Script Title: Style Sheet Switcher
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm
3) Describe problem:
Hi,
I can't figure out how to get this script working
I uploaded in /test/javascript the javascript file
I am using an index.php
I added the following for the javascript:
<script src="{$DOC_ROOT}javascript/styleswitch.js" type="text/javascript"></script>
="{$DOC_ROOT} (refers to /test)
<link rel="stylesheet" type="text/css" href="{$css_path}default.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="{$css_path}defaultblue.css" />
{$css_path} (= /test/templates/default)
Here is the default.css loaded and uploaded the defaulblue.css in the same directory.
added to index.php
<form id="switchform">
<select name="switchcontrol" size="1" onChange="chooseStyle(this.options[this.selectedIndex].value, 60)">
<option value="none" selected="selected">Default style</option>
<option value="blue-theme">Blue Theme</option>
</select>
</form>
the form shows but doesn't do anything.
tried also these lines the show but no results either (except a headache:-)
<a href="javascript:chooseStyle('none', 60)" checked="checked">Default style</a>
<a href="javascript:chooseStyle('blue-theme', 60)">Blue theme</a>
<script type="text/javascript">
window.onload=function(){
var formref=document.getElementById("switchform")
indicateSelected(formref.choice)
}
</script>
What do I have to do to make this code work for me? Preferable with a select menu as the interface.
Thanks in advance,
Jan
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm
3) Describe problem:
Hi,
I can't figure out how to get this script working
I uploaded in /test/javascript the javascript file
I am using an index.php
I added the following for the javascript:
<script src="{$DOC_ROOT}javascript/styleswitch.js" type="text/javascript"></script>
="{$DOC_ROOT} (refers to /test)
<link rel="stylesheet" type="text/css" href="{$css_path}default.css" />
<link rel="alternate stylesheet" type="text/css" media="screen" title="blue-theme" href="{$css_path}defaultblue.css" />
{$css_path} (= /test/templates/default)
Here is the default.css loaded and uploaded the defaulblue.css in the same directory.
added to index.php
<form id="switchform">
<select name="switchcontrol" size="1" onChange="chooseStyle(this.options[this.selectedIndex].value, 60)">
<option value="none" selected="selected">Default style</option>
<option value="blue-theme">Blue Theme</option>
</select>
</form>
the form shows but doesn't do anything.
tried also these lines the show but no results either (except a headache:-)
<a href="javascript:chooseStyle('none', 60)" checked="checked">Default style</a>
<a href="javascript:chooseStyle('blue-theme', 60)">Blue theme</a>
<script type="text/javascript">
window.onload=function(){
var formref=document.getElementById("switchform")
indicateSelected(formref.choice)
}
</script>
What do I have to do to make this code work for me? Preferable with a select menu as the interface.
Thanks in advance,
Jan