Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
10-19-2003, 07:15 PM #1
- Join Date
- Oct 2003
- Thanked 0 Times in 0 Posts
using document.body.style.zoom & top.document.body.clientHeight
the function in the parent is
factor=(((x/1010)<(y/670))? x/1010: y/670);
and the function in the iframe content is
x = top.document.body.clientWidth;
y = top.document.body.clientWidth;
factor=(((x/1010)<(y/670))? 1010/x: 670/y);
the reason why i call the unzoom function is to make sure that the text in the iframe does not become too big or too small, it works well on the first load, (both body and iframe content scales correctly) but after i click on the navigation bar (to cahnge the contents of the iframe), the iframe scales incorrectly, and i have to reload the page before it display correctly.
iframe's window.alert(x) returns the correct value the first time, and a value around 1000-1200 the after i click the navigation link.
navigation link function is by document.getElementById("content").src=link; (content is the id of the iframe)
I will appreciate if someone can give me a workaround to this problem.