Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2005, 09:18 AM
Authorized User
 
Join Date: Apr 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Document height within iframe...

Hi All

Has anyone dealt with this before Im struggling to find a solution.

Basically I have a page within an IFrame. I dont want the iframe to scroll but want to see the whole page below.

So I need to resize the height of the iframe according to the content that is within the document of the frame. Ive tried to use...

Code:
document.documentElement['offsetHeight']
etc.

but always turns out to be the current height of the iframe? Can anyone help?

Cheers

 
Old May 13th, 2005, 02:39 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Have you tried doing something like:

Code:
myIFrame.height = myIFrame.document.body.clientHeight
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Get XML Document from iFrame rvanandel Ajax 6 April 10th, 2009 05:24 AM
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
Fixed table height and row height rajanikrishna HTML Code Clinic 3 January 18th, 2007 12:42 AM
Details Height Paula222 Access VBA 1 April 11th, 2006 11:27 AM
Change height of div element if < window height JoelJunstrom Javascript How-To 1 October 10th, 2003 09:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.