Hi all.
I got some help from VonGrunt on changing the stylesheets:
The above works fine, however, how do you make it remain the same once the css style is selected (for example, if the user refreshed the page, how do you stop the selected style sheet from resetting to the default?).
I assume I would use cookies, but I am not really familiar with it....
Can anyone help?
I got some help from VonGrunt on changing the stylesheets:
Code:
<html>
<head>
<link id="external_style" rel="stylesheet" type="text/css">
</head>
<body>
<script language="javascript">
function setStyle( oSel )
{ sCSS = oSel.value;
if (sCSS!= "") document.getElementById("external_style").href = sCSS;
}
</script>
<form>
<select name="style" onchange="setStyle(this)">
<option value="">-- Choose style --</option>
<option value="red.css">Red</option>
<option value="green.css">Green</option>
<option value="blue.css">Blue</option>
</select>
</form>
<hr>
Blah blah blah
</body>
</html>
The above works fine, however, how do you make it remain the same once the css style is selected (for example, if the user refreshed the page, how do you stop the selected style sheet from resetting to the default?).
I assume I would use cookies, but I am not really familiar with it....
Can anyone help?