Created
August 21, 2009 03:33
-
-
Save wmh/171638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-- change iframe height and width | |
//child: <body onload="getIframeSize()"> | |
//for child | |
function getIframeSize() { | |
if (document.getElementById){ | |
var t = document.getElementById("t"); | |
try { | |
parent.wh("loginForm", t.offsetWidth, t.offsetHeight); | |
} catch (e) { | |
//alert("ERROR!"); | |
} | |
} | |
} | |
//for parent | |
function wh(obj, w, h) { | |
if (h <= 43) h = 43; | |
if (el(obj)) { | |
el(obj).style.height = h; | |
//el(obj).style.width = w; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment