SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Dec 18, 2007, 06:38 #1
- Join Date
- Sep 2004
- Location
- UK
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
dynamically changing the iFrame height
I’m trying to display a page inside an iFrame but I want the iFrame to dynamically change it’s height in relation to the height of the page within.
I have this bit of code in the iFrame Content page
<script language=”JavaScript”>
parent.handleResponse(300);
</script>
<script type="text/javascript">
function handleResponse(msg) {
var x = document.getElementById("myframe");
x.height = msg;
}
</script>
something like body.document.height, but I know it's not as simple as that. I’ve tried various different things like scrollHeight, client Height…and still no luck.
I'd appreciate any help you can offer.
-
Dec 19, 2007, 04:35 #2
- Join Date
- Sep 2004
- Location
- UK
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
** BUMP **
Any help on this is appreciated guys, and I do mean any help
-
Dec 19, 2007, 23:35 #3
- Join Date
- Jan 2007
- Location
- Christchurch, New Zealand
- Posts
- 14,729
- Mentioned
- 104 Post(s)
- Tagged
- 4 Thread(s)
It sounds like you're after the window.innerHeight value.
Bookmarks