This was driving me crazy all day yesterday, and I'm sick and tired of it
today.  IE problem only, naturally.  I'm loading an external source (which I
have control over) into an object tag.  I need to set the height of the
object to the content of the source.  Plays nicely in everything but IE
(tried 6/7), where it throws the "Object doesn't support this property or
method" error and freezes up.

The problem lies in this script, which is in the external source (tried some
different things, but can't get anything to work):

<script type="text/javascript" defer="defer">
<!--
if (window.addEventListener) {          // W3C
        window.addEventListener("load", setHeight, false);
} else if (window.attachEvent) {        // Exploder
        window.attachEvent("onload", setHeight);
} else {  // Old skool
        window.onload = function() {setHeight();}
}
function setHeight(){
var sH = (document.body.scrollHeight);
//var p = parent.document.getElementById("obj");
//p.style.height = sH+20;
parent.setObjHeight(sH+20);  // <<< HERE <<<
}
-->
</script>


setObjHeight() is in an external js loaded into the parent (along with
jQuery):

function setObjHeight(h){
 $('#obj').height(h);
}


I'm desperately trying to avoid an iframe solution, but I'm about to give
up.

Adam
-- 
View this message in context: 
http://www.nabble.com/-%21jQ----But-need-help%3A-%22Object-doesn%27t-support-this-property-or-method%22-tf3413795.html#a9512238
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to