?
Solved

Expaning iFrame

Posted on 2011-03-08
3
Medium Priority
?
318 Views
Last Modified: 2012-08-14
Hi

I have an ASP driven web site where we have a nested iFrame, nested within a div tag with an height set at auto, that is home to all the sub pages. Having a fixed height forces us to see two scroll bars on a page on the longer pages that are dropped.

I see several solutions from Joomla and PHP situation, but non that work for me in this environment. Thank you for you time.
<iframe src="dashboard.asp" name="pagecontent" width="780" height="100%" frameborder="0" scrolling="no">

Open in new window

0
Comment
Question by:iamteejay
[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
3 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 2000 total points
ID: 35083386
You could run an auto re-size script for IFRAME using javascript.
<script type="text/javascript">
function autoResize(id){
	var newheight;
	var iframe = document.getElementById(id);

	try{
          var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
          if (innerDoc.body.offsetHeight){ //ns6 syntax
             iframe.height = innerDoc.body.offsetHeight + 32; //Extra height FireFox
          }
          else if (iframe.Document && iframe.Document.body.scrollHeight){ //ie5+ syntax
             iframe.height = iframe.Document.body.scrollHeight;
          }
        }
        catch(err){
          alert(err.message);
        }

}
</script>
<div>
	<iframe id="some_frame" src="dashboard.asp" width="780" height="100%" scrolling="no"
		onload="autoResize('some_frame');" frameborder="0">
	</iframe>
</div>

Open in new window

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35868888
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

770 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