Hello,
Through an onClick() event, I have an inline function to change the
font size of the page (actually, I need to do this for the entire
website). I have this defined in the header.cfm file as:
onclick="document.body.style.fontSize='50%';"
This does not work at all for some reason. Whereas,
onclick="document.body.style.backgroundColor='green';"
works. I am not able to understand why this is happening.
Any help is greatly appreciated.
Thanks,
jnag
Georgi Naumov - 29 May 2007 22:00 GMT
This code working for me.
onclick="document.body.style.fontSize='50%';"
(FF2 and IE6) . You can try something like this:
onclick="try{document.body.style.fontSize='50%';}catch(ex)
{alert(ex.message);}"
To see what is problem.
jnag :
> Hello,
>
[quoted text clipped - 14 lines]
> Thanks,
> jnag
Pete - 30 May 2007 06:23 GMT
> onclick="document.body.style.fontSize='50%';"
>
> This does not work at all for some reason. Whereas,
<a href="#" onclick="document.body.style.fontSize='50%';return
false;">link</a>
this works fine.
how are you calling onclick?
jnag - 31 May 2007 14:31 GMT
> > onclick="document.body.style.fontSize='50%';"
>
[quoted text clipped - 6 lines]
>
> how are you calling onclick?
I am calling onclick in a header.cfm file. And, I want to change the
font of the <body> of the content pages which are outside the header/
banner. The error message I am getting says that it cannot find the
object to change font.
jnag - 31 May 2007 14:37 GMT
> > onclick="document.body.style.fontSize='50%';"
>
[quoted text clipped - 6 lines]
>
> how are you calling onclick?
Actually, now I am not getting any error message. But, the fontSize
does not change either upong clicking the link/button in the banner.