Click here to Skip to main content
15,565,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

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

JavaScript
function ReSize()
{

//Do stuff for iframe resize

} 



Child page function.

JavaScript
$(document).ready(function(){

top.ReSize(); //it will call main parent page function from child page.

});
 
Share this answer
 
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900