zoomLetter(mysize) does not seem to be working so I just made up a value of 2 to get a cookie for it. Your functions to make a cookie are the top two functions. I then added the w3shools code for reading them. did a on load thing and instead of changing the font and bgcolor I just used an alert to show you what the cookies are set to.
You can change the magnif to what ever you want to check it. But this is how it's done.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>New document</title>
<script type="text/javascript">
function zoomLetter(mysize) {
document.cookie="magnif="+8;
}
function changeBGC(color){
document.bgColor = color;
document.cookie="bgcolor="+color;
}
/*AND NOW*/
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function checkCookie()
{
var magnify = getCookie("magnif");
var thecolor = getCookie("bgcolor");
if (magnify != null && magnify != "" && thecolor != null && thecolor != "")
alert("the magnify is "+magnify+" and the color is "+thecolor);
}
</script>
<body onload="checkCookie()">
<div id="topbox"><img src="WFDA-headerright.gif" width="574" height="291" alt="headerright" /></div>
<div id="welcome">
<p>Welcome<br /><br />
Welcome to the Waltham Forest Dyslexia Association (WFDA). We are a grassroots charity that has been running since 1989 set up by concerned individuals – both parents of children with dyslexia and by teachers that specialise in dyslexia. Although we are affiliated with the British Dyslexia Associaiton (BDA) we are dependent on membership subscriptions, grants and fundraising.</p> </div>
<div id="welcome2">
<p>Our Vision<br /><br />
WFDA is committed to sending out a lifeline to people with dyslexia who often have nowhere else to turn. Our vision is that we will live in a dyslexic friendly society that enables dyslexic people of all ages to reach their full potential. </p>
</div>
<div id="welcome3">
<p>Our Aim <br /><br />
To support the needs of dyslexic children, young people and adults by providing an accessible, affordable, quality service run by appropriately trained staff. Also to advance the education of dyslexic people of all ages to help them to improve their confidence and independence as well as their well-being.</p>
</div>
<div id="header"><img src="WFDA-header.gif" width="630" height="291" alt="WFDA logo" /></div>
<div id="picture1">
</div>
<div id="background"><strong>Background colour</strong>
<table width="307" border="0" align="center" cellpadding="2">
<tr> <td width="13" bgcolor="#cccccc"><a href="#" onClick="javascript:changeBGC('#cccccc')"> </a> </td>
<td width="13" bgcolor="#ccccff"><a href="#" onClick="javascript:changeBGC('#ccccff')"> </a></td>
<td width="13" bgcolor="#ccffff"><a href="#" onClick="javascript:changeBGC('#ccffff')"> </a></td>
<td width="13" bgcolor="#99ffcc"><a href="#" onClick="javascript:changeBGC('#99ffcc')"> </a></td>
<td width="13" bgcolor="#3dffdd"><a href="#" onClick="javascript:changeBGC('#3dffdd')"> </a></td>
<td width="13" bgcolor="#88dd00"><a href="#" onClick="javascript:changeBGC('#88dd00')"> </a></td>
<td width="13" bgcolor="#ccff00"><a href="#" onClick="javascript:changeBGC('#ccff00')"> </a></td>
<td width="13" bgcolor="#eeee00"><a href="#" onClick="javascript:changeBGC('#eeee00')"> </a></td>
<td width="13" bgcolor="#ffcc00"><a href="#" onClick="javascript:changeBGC('#ffcc00')"> </a></td>
<td width="13" bgcolor="#cc9999"><a href="#" onClick="javascript:changeBGC('#cc9999')"> </a></td>
<td width="13" bgcolor="#ff9999"><a href="#" onClick="javascript:changeBGC('#ff9999')"> </a></td>
<td width="13" bgcolor="#ff99ff"><a href="#" onClick="javascript:changeBGC('#ff99ff')"> </a></td>
<td width="13" bgcolor="#ffcccc"><a href="#" onClick="javascript:changeBGC('#ffcccc')"> </a></td>
<td width="13" bgcolor="#ffffbb"><a href="#" onClick="javascript:changeBGC('#ffffbb')"> </a></td>
<td width="13" bgcolor="#FFFFFF"><a href="#" onClick="javascript:changeBGC('#FFFFFF')"> </a></td>
</tr>
</table>
<table width="108" border="0" align="center" cellpadding="2">
<tr>
<td width="50" height="49"> <h1 id="sprytrigger1"><a href="#" onclick="zoomLetter(1)">A+</a></h1></td>
<td width="44"><h3 id="sprytrigger2"><a href="#" onclick="zoomLetter(-1)">A-</a></h3></td>
</tr>
</table>
</body>
</html>