?
Solved

Javascript to auto resize an iFrame

Posted on 2007-11-19
4
Medium Priority
?
1,966 Views
Last Modified: 2009-12-16
Hi

Does anyone have any javascript for resizing an iframe, a client does not want to have scrolling bars but needs to pull content from another website which is providing a search service for them.

Ideally it needs to get the content height and set the size of the iframe.

Alternativly can anyone reccomend another method for pulling content from another url and displaying it in my page. Never really used frames so would not know the best way to use them, the page is built with html/css and cant lose any formating.

Here is my current attempt!!

http://clients.fruit-studios.com/curtisfrank/search.html


Many thanks in advance

-s-
0
Comment
Question by:socross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
Mr_Splash earned 2000 total points
ID: 20311677
The following works well

"resizing the IFRAME to be the height of the page contained within it, eliminating any possible IFRAME scrollbars from appearing while snugly showing the entire external content."

http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
0
 
LVL 1

Author Comment

by:socross
ID: 20311703
perfect thanks

will try and implement shortly

-s-
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 20311922
Interesting... If the other one does not work and this does...
0
 
LVL 1

Author Comment

by:socross
ID: 20316924
The script does exactly what is required but only for documents from the same domain.

See this question for the required steps to use the script with content from another domain, it uses curl to get the required html and displays it in the iframe.

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22965420.html

Thanks to all

-s-
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This article discusses how to implement server side field validation and display customized error messages to the client.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question