[beginner]how to set a iframe's size to let it won't show thescroller ?

D

devdoer

HI:
I have a page contain anthoer site's iframe window, but the iframe
window ' document is large, so the scroller shows in the iframe
window.
I decide to caculate the iframe document's true size and set the
iframe 's height and width according the document's true size , how
can I do this? by scrollMaxY of the iframe ?

Thanks.
 
A

ajaxexample

Have you thought of making the document in your iframe have the same
width and height as the iframe, and then use CSS and set overflow to
hidden?

Neil Roberts <a href="http://ajaxexample.net">Ajax Example</a>
 
T

Thomas 'PointedEars' Lahn

Have you thought of making the document in your iframe have the same
width and height as the iframe, and then use CSS and set overflow to
hidden?

AIUI the OP is not in control over the document in the iframe,
which is what makes their iframe approach a really bad idea.
[Top post, advertised site without proper delimiter]

Please learn to quote and stop spamming.


PointedEars
 
D

devdoer

Have you thought of making the document in your iframe have the same
width and height as the iframe, and then use CSS and set overflow to
hidden?

Neil Roberts <a href="http://ajaxexample.net">Ajax Example</a>




- ÏÔʾÒýÓõÄÎÄ×Ö -

No.The iframe's document is not controlled by me.It's other web-site's
page. I want to know how can I calculate the height of the document of
the iframe, so I can set the iframe size to contain the whole
documdent without showing the scroller bar of the iframe,otherwise
there may be two scroller bar's in my page ,one is my page's ,the
other is the iframe's .
 
S

SAM

devdoer a ¨¦crit :
No.The iframe's document is not controlled by me.It's other web-site's

so you can do nothing with this document (page, file) with JavaScript
(no cross domain allowed)
page. I want to know how can I calculate the height of the document of
the iframe, so I can set the iframe size to contain the whole
documdent without showing the scroller bar of the iframe,

anyway it is a bad idea :-(
otherwise there may be two scroller bar's in my page

do not understand where is the problem
 
A

ajaxexample

No.The iframe's document is not controlled by me.It's other web-site's
page. I want to know how can I calculate the height of the document of
the iframe, so I can set the iframe size to contain the whole
documdent without showing the scroller bar of the iframe,otherwise
there may be two scroller bar's in my page ,one is my page's ,the
other is the iframe's .

But you can nest your own document that can contain an overflow:
hidden node that can contain their iframe. Of you can use JavaScript
to write this into an iframe if speed is important.

Bill Robbins
http://ajaxexample.net
 

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,995
Messages
2,570,230
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top