problem with iframe resizing

K

khothikhe

can some one help me here coz this is really killing me!

the problem is, i have this javascript code in my aspx page that i want it
to work on almost all browsers, especially opera and safari :

function resize(){
displayFrm = document.getElementById("ifrmDisplay");

innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument :
displayFrm.contentWindow.document;

objToResize = (displayFrm.style) ? displayFrm.style : displayFrm;

objToResize.height = innerDoc.body.scrollHeight;
}

the code above gets called every time a new page is loaded inside the iframe
(ifrmDisplay) what its doing is resizing the iframe so it can have the same
size as the page inside it, so i can eliminate the need for vertical
scroller for the iframe, i assumed that it works on opera and IE at the same
time, when i tried it out, it worked on IE but not on opera. after lot of
time in researching how i can get workaround this issue with opera, that is
the best possible solution i have and yet it doesnt work. so i gave up and
asking you if you can help me out here , coz this is jst driving me crazy!

the problem is im not a javascript expert, to be honest i jst started doing
javascripts about two days ago, that is why im in need for help

by the way, here is inner html for the iframe if its any use

<iframe id="ifrmDisplay" style="Z-INDEX: 99; LEFT: 187px; WIDTH: 567px;
POSITION: absolute; TOP: 136px; HEIGHT: 408px" src="" scrolling="no"
onload="resize();">
</iframe>
 
K

khothikhe

Go **** yourself!

if you don't have an answer to the problem then why reply with your stupid
comments!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top