Perhaps set the SRC attribute of the iframe to '', resize it, and restore the SRC attribute?
Main Topics
Browse All TopicsWe have several pages on our site where we integrate a couple 3rd party vendor sites using iframes. I understand that javascript can not access the attributes of the iframe if the iframe source is not the same domain as the parent site (for security purposes). So we create our own sub-domain and point it to the IP of their domain that they have created for us.
For example (not real): our domain is www.cruisetesting.com and the page we are accessing is vacations.cruisebookings.c
This works great and it appears to have our domain as they browse through a 3rd party site. The problem is the Access Denied error we get when trying to resize the iframe. This has worked in the past but we are doing a new site and it isn't working.
Here is the Javascript function that is used.
function calcHeight(i_frame) {
//find the height of the internal page
iframeHeight = document.getElementById(i_
//change the height of the iframe
document.getElementById(i_
}
Any ideas would be very appreciated. Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Unfortunately the solution can not involve any changes needed by the 3rd party. Not cost effective and they would need to include the change on every one of their pages.
I will try your suggestion tomorrow Badotz, allow I don't think it will work.
Anybody else have any suggestions? Is there anyway for the 3rd party to allow us as a trusted user or something on their web server? Maybe a compact privacy policy?
Business Accounts
Answer for Membership
by: mrichmonPosted on 2007-12-26 at 13:06:07ID: 20530918
That is still a different domain. From iframe point of view you cannot change if it is a different domain.
t() justHistor yHeight) != "undefined") yHeight(Ma th.max(doc ument.body .scrollHei ght, document.body.offsetHeight ) + 30);
nerHeight( )"
frame.id). style.heig ht = height + "px";
Can you have them add code to the iframe page?
This code would do it:
<script type="text/javascript">
function AdjustParentContainerHeigh
{
if(typeof(window.parent.Ad
{
window.parent.AdjustHistor
}
}
</script>
Then add to the body tag of iframe page an onLoad="AdjustParentContai
Then the parent page has this:
function AdjustiFraneHeight(height)
{
document.getElementById(i_
}