Solved

Expaning iFrame

Posted on 2011-03-08
3
314 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 500 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

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

Suggested Solutions

Title # Comments Views Activity
Html date format 9 20
CSS for <center> 14 35
How to add custom html-5 element to a dynamically generated link? 4 24
How to get chosen background-color on every line? 10 21
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

733 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