|
Hello,
I created a website with the ability to increase or decrease
the font size.
When I had this website with 1 ISP provider, it worked.
When I moved the website over to a different provider, my
code will only allow the user to increase or decrease by 1 size.
Why would this happen? Below is my code.
function resizeText(multiplier)
{
var ifontsize = 0;
var sTemp1 = readCookie("PageHeading");
var sTemp2 = readCookie("MainBody1");
if ((! sTemp1) || (! sTemp2) || (document.body.style.fontSize == ""))
{
document.body.style.fontSize = "1.0em";
document.getElementById('PageHeading').style.fontSize = "1.0em";
createCookie("PageHeading", "1.0em", 7);
document.getElementById('MainBody1').style.fontSize = "0.8em";
createCookie("MainBody1", "0.8em", 7);
}
/* PAGE HEADING */
ifontsize = document.getElementById('PageHeading').style.fontSize;
document.getElementById('PageHeading').style.fontSize = parseFloat(ifontsize) + (multiplier * 0.1) + "em";
ifontsize = document.getElementById('PageHeading').style.fontSize;
eraseCookie("PageHeading");
createCookie("PageHeading", ifontsize, 7);
/* MAINBODY 1 */
ifontsize = document.getElementById('MainBody1').style.fontSize;
document.getElementById('MainBody1').style.fontSize = parseFloat(ifontsize) + (multiplier * 0.1) + "em";
ifontsize = document.getElementById('MainBody1').style.fontSize;
eraseCookie("MainBody1");
createCookie("MainBody1", ifontsize, 7);
}
|
|
|
|
|
|
|
// |