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 October 30th, 2006, 02:43 AM
Registered User
Join Date: Oct 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default IFrame and the contextmenu

Hello All,

I have some problem with iframe...

<iframe id="myframe" src="http://www.google.co.in/" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"> </iframe>

I added this iframe in other web project. Now problem is i want to set iframe height dynamically as per it's content. i wrote jscript for that..but it give me Access Denied Error.on below blue color line.

function iFrameHeight() {
var h = 0;
if ( !document.all ) {
h = document.getElementById('iframe').contentDocument. height;
document.getElementById('iframe').style.height = h + 70 + 'px';
} else if( document.all ) {
h = document.frames('iframe').document.body.scrollHeig ht;
document.all.iframe.style.height = h + 30 + 'px';

finally i found that ..if you have the iframe's document from a different source to your main page then you will be Access denied error.

But i Need Strictly do that .. i want to give diffrent source to iframe and also set dynaicall height of iframe as per it's content.

How can i do that ? Please give me the solution for that.. or if you know any idea of paid control for that please suggest me.

thanx in advance..

Harshad Patel

Old November 1st, 2006, 02:20 AM
Friend of Wrox
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran

Hi harshad,
I'm also searching a code, but still not found, if you found please send me a mail to surendran at mail dot com.
i think it is not possible to handle with other sites, if can we can mage that perticular page scrollbars colours.

(Anything is Possible)

Similar Threads
Thread Thread Starter Forum Replies Last Post
ContextMenu obrienkev Visual Studio 2005 1 November 30th, 2007 03:21 AM
Page 370 - New ContextMenu MajorD BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 July 25th, 2007 10:26 AM
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
IFrame and the contextmenu harshad Javascript 2 October 31st, 2006 02:10 AM
IFrame and the contextmenu sherbir Javascript 6 April 28th, 2006 01:48 AM

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