Click here to Skip to main content
13,198,727 members (41,545 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I have a function on my parent page to update the iframe's height automatically by its onLoad event and it works.
But when changing locations from inside the iframe it does not update the height, instead it retains the height of the previous page from where I think the iframe has been targeted.
Posted 11-Jun-14 22:44pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Call that function of parent page from child page like that,
if you have function having name ReSize for resize iframe in parent page than you can call it from child page with top clause in javascript like that

Parent page function

function ReSize()
{
 
//Do stuff for iframe resize
 
} 



Child page function.

 
$(document).ready(function(){
 
top.ReSize(); //it will call main parent page function from child page.
 
});
  Permalink  
Comments
Richard Dale Umayan 12-Jun-14 5:33am
   
Thanks!
Nirav Prabtani 12-Jun-14 5:35am
   
welcome.. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.171020.1 | Last Updated 12 Jun 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100