PDA

View Full Version : Changing fontsize in an inline-frame with javascript... how to?


sunnyday
07-29-2007, 08:56 AM
Hi,
I'm trying to improve my web page usability by including a increase/decrease font-size function.
Eventually I decided to memorize selected font-size (smaller, bigger, ...) in a cookie, and when reloding the page font size of some specific IDs are settled according to the value in the cookie.

e.g. javascript
ids = document.getElementById(...IDs array element...);
ids.style.fontSize = ...cookievalue...;

It works fine for every ID in the page except for those which are in an in-line frame loaded while loading the main page.

e.g. html
<iframe id="itext" name="itext" frameborder="0" scrolling="auto" height="400px" width="800px" marginheight="0px" marginwidth="0px" alt="page content" title="text"></iframe>

e.g. javascript
document.getElementById("itext").src = ...another html page...;

What am I wrong? :smack:
Can I address an ID in an in-line frame? If yes, how?
Someone can help me?

Thanks for every hint and suggestion...

Lucy

Spock
07-29-2007, 03:20 PM
You might take a look here (http://www.dyn-web.com/dhtml/sizefont/index.php).