Nur farhain

Nur farhain

  • NA
  • 5
  • 0

iframe replacement with object

Feb 18 2010 9:11 PM

Hello,
I'm work with ASP.net..i had problem when i replace <iframe> tag with <object> tag.. The error message propmt
1. "object required" in javascript file..
this is my code in javascript(.js) file:
function
adjustHeight() {
// Calculate the height of the header.
var head = parent.document.getElementById("head");
var one = parent.document.getElementById("one");
var two = parent.document.getElementById("two");
var refList=document.getElementById("refList");
var frmTrans=document.getElementById("transFrame");
var folderResizer = parent.document.getElementById("folderResizer");
var screenHeight = getScreenHeight();
var screenWidth = getScreenWidth();
alert(
'head != null');
if (head != null) {
if (screenHeight > head.offsetHeight) {
one.style.height = screenHeight - head.offsetHeight; //error message : "object required"
one.style.top = head.offsetHeight;//error message : "object required"

folderResizer.style.left = one.offsetWidth - (folderResizer.offsetWidth/2); //error message : "object required"
folderResizer.style.height = one.style.height; //error message : "object required"

two.style.top = head.offsetHeight; //error message : "object required"
two.style.left = one.offsetWidth + 4; //error message : "object required"
two.style.height = one.style.height; //error message : "object required"
two.width = screenWidth - parseInt(one.offsetWidth) - 4; //error message : "object required"


refList.style.height=two.style.height; //error message : "object required"
refList.style.left=two.style.left; //error message : "object required"
refList.width = two.width; //error message : "object required"
frmTrans.style.height=two.style.height; //error message : "object required"
frmTrans.style.left=two.style.left; //error message : "object required"
frmTrans.width = two.width; //error message : "object required"
}
}
}
2. "object doesn't support this property or method" at body.aspx file
please see the code below :
default.aspx
<
script type="text/javascript">
function
showHideReflist(mode) {
......
}

</script>
body.aspx
 <script type="text/javascript">
function pageLoad(){
........
parent.showHideReflist(2); // error message : "object doesn't support this property or method"
........
}
</script>
please help me, so that i can solve this problem as soon as possible
thank you...

Answers (3)