473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

whats wrong withat ref: window.frames["ifrm_3"].contentDocument.body.style.fontSize ?

what's wrong with that ref: window.frames["ifrm_3"].contentDocument.body.style.fontSize ?
I thought it would be similar to that:
document.body.style.fontSize

Or else this works
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function resizeText(af3isi) 
  3. {var size=parseFloat(window.frames["iframe_3"].contentDocument.body.style.fontSize)
  4.  if(size>8 && size<18)
  5.    {    Document.body.style.fontSize= parseFloat(Document.body.style.fontSize) + (af3isi) + "px";
  6.    }
  7.  else if (size<=8)
  8.    {
  9.        if(af3isi<0)
  10.          {
  11.              Document.body.style.fontSize=10+(af3isi)+"px"
  12.          }
  13.        else
  14.          {
  15.              Document.body.style.fontSize=8+(af3isi)+"px"
  16.          }
  17.    }
  18.  else
  19.    {
  20.       if(af3isi>0)
  21.         {
  22.             Document.body.style.fontSize=16+(af3isi)+"px"
  23.         }
  24.       else
  25.         {
  26.             Document.body.style.fontSize=18+(af3isi)+"px"
  27.         }
  28.    }
  29. }
  30. </script>
but this doesn't
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function resizeText(af3isi) 
  3. {var size=parseFloat(window.frames["iframe_3"].contentDocument.body.style.fontSize)
  4.  if(size>8 && size<18)
  5.    {    window.frames["iframe_3"].contentDocument.body.style.fontSize= parseFloat(window.frames["iframe_3"].contentDocument.body.style.fontSize) + (af3isi) + "px";
  6.    }
  7.  else if (size<=8)
  8.    {
  9.        if(af3isi<0)
  10.          {
  11.              window.frames["iframe_3"].contentDocument.body.style.fontSize=10+(af3isi)+"px"
  12.          }
  13.        else
  14.          {
  15.              window.frames["iframe_3"].contentDocument.body.style.fontSize=8+(af3isi)+"px"
  16.          }
  17.    }
  18.  else
  19.    {
  20.       if(af3isi>0)
  21.         {
  22.             window.frames["iframe_3"].contentDocument.body.style.fontSize=16+(af3isi)+"px"
  23.         }
  24.       else
  25.         {
  26.             window.frames["iframe_3"].contentDocument.body.style.fontSize=18+(af3isi)+"px"
  27.         }
  28.    }
  29. }
  30. </script>
Nov 12 '10 #1
0 954

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yaron Cohen | last post by:
Hi, I would like to ask for your help (I am using only IE5.5). I have a very big table that I would like to sort. During the sort I would like the cursor changed to 'wait' state and back to...
2
by: Benny Pedersen | last post by:
<head><title>Test</title> <style>body{font-Family="courier new";} </style> <script language="javaScript"> function changeTxt() { document.getElementById("b").style.fontFamily="Verdana";...
3
by: Chris Geerdink | last post by:
combo with PHP. what is wrong with the Javascript? else { include("mysql.php"); $query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES ('".$_POST."', '".$_POST."',...
3
by: mahsa | last post by:
Hi do you know whats wrong with this code? <asp:HyperLink id="HLink_Help" runat="server" NavigateUrl='<%# "javascript:window.open('comments.aspx?id=1,width=500,height=600, scrollBars=yes');"...
4
by: blah | last post by:
Hello everyone, Ive been trying to get my application to "click" on a button in another application using SendMessage, Ive gotten this far but Im not sure whats wrong with this code, here is the...
7
by: Mike Barnard | last post by:
It's a simple test... VERY SIMPLE. But... In an external stlyesheet some attributes don't show. With the same styles cut and pasted to the test internally it works as expected. Anyone tell...
4
by: jnag | last post by:
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...
3
by: jnag | last post by:
I am trying to implement font changer, where I have links on the banner of the site and when the user clicks on the links, the font size of the page has to change. I tried...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.