By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Resizing an iFrame

P: 55
Hi
I need to resize an iframe so that it doesn't show its scrollbars. It can't exceed this height by much. I need to open internal and external pages in this frame. Yes, I know it would be easier to open them in a new window, but thats not an option. Any suggestions?
Dec 18 '09 #1
Share this Question
Share on Google+
4 Replies


gits
Expert Mod 5K+
P: 5,390
on which base you want to do the resizing? ... i just ask because in case of external files you cannot read from the page ... since that would be against the same origin policy.

kind regards
Dec 19 '09 #2

P: 55
well, I basically want the frame to have enough height so that it doesn't have a vertical scroll bar, so it is based on the size of the content of the iframe. No work around, huh?

Thanks for response :)
Dec 19 '09 #3

gits
Expert Mod 5K+
P: 5,390
as i said ... for external pages you would be out of luck ... the external owner wants to and should have the only control about his content ...
Dec 20 '09 #4

acoder
Expert Mod 15k+
P: 16,027
There's one or two ways you could do this: if you serve the page from your domain, or if you control the external domain, you can add some code.

One question though: what if the height of the page is very large?
Dec 22 '09 #5

Post your reply

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