View Single Post
Old 01-09-2013, 12:07 AM   PM User | #5
Henry.
New to the CF scene

 
Join Date: Jan 2013
Location: London, UK
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Henry. is an unknown quantity at this point
Quote:
Originally Posted by sunfighter View Post
Please notice that your top function is not inside javascript tags and your last function does not have a close tag.
Sorry. I missed them out when C&Ping. I also appear to have missed out the following:

<script type="text/javascript">
var min=12;
var max=24;
function zoomLetter(mysize) {.....


Quote:
Your zoomLetter(mysize) function does not work
It does for me. Calling it as zoomLetter(1) increases the size of the page font by 1px each time, and calling it as zoomLetter(-1) decreases the size of the font by 1px each time.

Quote:
Haven't tried to trouble shoot it cause it don't make sense when you only want to store one of two values.
I want to store all the possible values between 14px and 24px. Each time the user hits one of the increase or decrease size buttons (to call zoomLetter) the font size changes between those values, 1px at a time, up or down. 14 -24 (inclusive) = 11 possible values.

I've temporarily added another button to change the size to an arbitrary size, 22px, by calling zoomLetter(22), and that also works.

What doesn't work is the session cookie. Each page opens in the default font size, not the one chosen by the user, even when going back to the page on which the size was originally set

Another session cookie that keeps track of the background colour, on the same page, does work using the same get_cookie(name) function. Each page opens with the correct user chosen bgcolour.
Henry. is offline   Reply With Quote