Page 1 of 1

Font size changer

Posted: Tue May 06, 2008 9:12 am
by Probocop
Is there some sort of font size changer I can use with CMSMS?

I set up a Javascript font size changer that uses cookies to save the font size between pages.  This works fine for all the pages on the default template, but when I click a link to a page using a different template it doesn't save the font size.

Is it that the cookies arent working on different templates or something?

Re: Font size changer

Posted: Tue May 06, 2008 2:24 pm
by Nullig
Did you put the javascript into the head section of the other template?

Nullig

Re: Font size changer

Posted: Wed May 07, 2008 8:32 am
by Probocop
All the javascript appears to be in place.  Once I'm at the page I've just clicked the link to, I can change the font size, but it will only stay that size between pages on the default template for some reason.

The website is: http://www.bettersight.co.uk

Re: Font size changer

Posted: Wed May 07, 2008 12:08 pm
by KO
It might have something to do that you do not have that onload thingy in .

i'm not an javascript expert but you could try also adding:

window.onload = setDefaultFontSize();

on your javascript file. then you could remove whatever is in frontpage tag. Or adding whatever is in there to other templates. Othervise js is not executed on page load.

Re: Font size changer

Posted: Wed May 07, 2008 1:06 pm
by Probocop
Thank you!
I had completely forgotten about the body onload thing, these sort of problems always have the most obvious things causing them.

All working now.  :)