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 392,370 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 2,746 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: Nov 2006
Posts: 1
Reputation: vbnullchar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vbnullchar vbnullchar is offline Offline
Newbie Poster

Re: Dynamic iframe height

  #5  
Nov 27th, 2006
What if my source is from other domain? this is my problem right now?

Originally Posted by hilmanDev View Post
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]
Reply With Quote  
All times are GMT -4. The time now is 12:49 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC