|
|
document.body.style.fontsize is not working
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
|
|
0
|
|
|
|
Reply
|
prajyo91 (6)
|
5/29/2007 8:42:30 PM |
|
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,
>
> 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
|
|
0
|
|
|
|
Reply
|
Georgi
|
5/29/2007 9:00:29 PM
|
|
>
> 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?
|
|
0
|
|
|
|
Reply
|
Pete
|
5/30/2007 5:23:50 AM
|
|
On May 30, 1:23 am, Pete <peter.gal...@gmail.com> wrote:
> > 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?
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.
|
|
0
|
|
|
|
Reply
|
jnag
|
5/31/2007 1:31:28 PM
|
|
On May 30, 1:23 am, Pete <peter.gal...@gmail.com> wrote:
> > 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?
Actually, now I am not getting any error message. But, the fontSize
does not change either upong clicking the link/button in the banner.
|
|
0
|
|
|
|
Reply
|
jnag
|
5/31/2007 1:37:20 PM
|
|
|
4 Replies
718 Views
(page loaded in 0.111 seconds)
Similiar Articles: document.body.style.fontsize is not working - comp.lang.javascript ...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)... Change font, fontsize in publish output - comp.soft-sys.matlab ...document.body.style.fontsize is not working - comp.lang.javascript ... Change font, fontsize in publish output - comp.soft-sys.matlab ... document.body.style.fontsize is ... why does execCommand('SaveAs') not work - comp.lang.javascript ...document.body.style.fontsize is not working - comp.lang.javascript ..... as: onclick="document.body.style.fontSize='50%';" This does not work ... getElementById ... work ... getting an iframe to return to top onclick of a button - comp.lang ...document.body.style.fontsize is not working - comp.lang.javascript ... Hello, Through an onClick() event, I have ... Whereas, > <a href="#" onclick="document.body.style ... How to change the fontsize of labels of boxplot - comp.soft-sys ...document.body.style.fontsize is not working - comp.lang.javascript ..... an onClick() event, I have an inline function to change the font size of ... using javascript with radio button to disable a text box - does ...document.body.style.fontsize is not working - comp.lang.javascript ..... does not work ... not working - comp.lang.javascript ... using javascript with radio button to ... Getting MinionPro font to work - comp.text.texdocument.body.style.fontsize is not working - comp.lang.javascript ... Getting MinionPro font to work - comp.text.tex document.body.style.fontsize is not working - comp ... Sync scrolling of divs (not frames) - comp.lang.javascript ...document.body.style.fontsize is not working - comp.lang.javascript ... Sync scrolling of divs (not frames) - comp.lang.javascript ... // Begins var topdiv; var bottomdiv ... PHP strict standards? - comp.lang.phpdocument.body.style.fontsize is not working - comp.lang.javascript ... PHP strict standards? - comp.lang.php document.body.style.fontsize is not working - comp.lang ... awk on android? - comp.lang.awkdocument.body.style.fontsize is not working - comp.lang.javascript ..... content=3D"MSHTML 8.00.6001.18876"> <STYLE></STYLE> </HEAD> <BODY ... newbie: awk ... style ... document.body.style.fontsize is not working - JavaScript / Ajax ...document.body.style.fontsize is not working. JavaScript / Ajax / DHTML Forums on Bytes. document.body.style.fontsize is not working - comp.lang.javascript ...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)... 7/20/2012 12:12:51 PM
|
|
|
|
|
|
|
|
|