User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,802 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,797 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Dynamic iframe height

Join Date: Oct 2006
Location: Indonesia
Posts: 1
Reputation: hilmanDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hilmanDev hilmanDev is offline Offline
Newbie Poster

Re: Dynamic iframe height

  #4  
Oct 2nd, 2006
Originally Posted by joshkotecha View Post
Did you find a solution? I'm trying to do something very similar and have some problems with the dyniframe.js you reference.


I have found the solution for your problem based on dyniframe.js
I hope this solution is meaningful for you :cheesy:

The solution is you have to put last statement into new own function. and every page that you want to load into the frame call parent function that you created before. For example :

in Main Page (before) :

[html]<Script>
...
...
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</Script>[/html]

Change into :
[html]<Script>
...
...
function onLoadPage() {
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
}
</script>[/html]

On every frame page put script on body tag like this :
[html]<body onLoad="parent.onLoadPage();">
...
...
</body>[/html]
Last edited by tgreer : Oct 2nd, 2006 at 9:26 am. Reason: User ignored directions for code tags.
Reply With Quote  
All times are GMT -4. The time now is 2:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC