i am creating a stylesheet picker and so far i have the stuff that changes the stylesheet… now i am just gonna write a cookie so that i can use this stylesheet on every page
here is what i have so far
[I]<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<SCRIPT>
//the cookie functions
//——————–
[B]function setredcookie()
{
}
//——————–
//the styles
function redwhite()
{
with (document)
{
write(‘<title>Chadypu.com||Red and White</title>’)
write(‘<style>’)
write(‘BODY {Background:#CC0000; color:white}’);
write(‘A:link {color:blue;}’);
write(‘A:active {font-size:h4; text-decoration: underline}’);
write(‘A:Visted {color:purple;}’);
write(‘</style>’);
write(‘<img src=”../Images/Banner1.jpg”>’)
write(‘<BR>hello’);
}
}
function bluewhite()
{
with (document)
{
write(‘<title>Chadypu.com||Blue and white</title>’)
write(‘<style>’)
write(‘BODY {Background:#6633FF; color:white}’);
write(‘A:link {color:red;}’)
write(‘A:active {text-decoration: underline}’);
write(‘A:Visted {color:purple;}’);
write(‘</style>’);
write(‘<img src=”../Images/Banner2.jpg”>’)
write(‘<BR>hello’);
}
}
//——————–
</Script>
</head>
<body bgcolor=”#ffff00″ text=”#ff0000″>
<h1>What theme would you like?</h1>
<A Href=javascript:redwhite()>White on Red</A><br>
<A Href=javascript:bluewhite()>White on Blue</A><br>
<A Href=mailto:
<b>
<br>test text
<br>[test]
</b>
</body>
</html>
as you can see i didnt get too far on function setredcookie
can someone atleast get me pointed in the right direction on what to do
i have never done anything with cookies before
all i wanna know is how i set the cookie and how i retrieve it
if someone could write something that would be great