N
Nathan Carr
I'm having trouble getting the offsetLeft of an iframe that is inside
a div tag inside another iframe that is inside a frame.
I have something like this (inside main.asp)
<DIV id="divHeader" name="divHeader"
style="position:relative;left:0;top:0;width:660;height:10;z-index:1">
<IFRAME NAME="iHeader" src="header.asp" frameborder=0
marginheight=0 marginwidth=0 width=100% height=100%
scrolling=no></IFRAME>
</DIV>
inside header.asp
<DIV id="divAccounts" name="divAccounts"
style="position:relative;left:0;top:0;width:100%;height:69;z-index:1">
<iframe id="iAccounts" name="iAccounts" src="somewhere.asp"
width="100%" height="69" frameborder="0" scrolling="yes" align="top"
marginwidth=0 marginheight=0 hspace=0 vspace=0></iframe>
</div>
I'm trying to do this...
top.document.getElementById("divHeader").document.getElementById("iHeader").document.getElementByID("divAccounts").offsetLeft
or
top.document.getElementById("divHeader").document.getElementById("iHeader").document.getElementByID("iAccounts").offsetLeft
it just gives me an error.
when i do
top.document.getElementById("divHeader").document.getElementById("iHeader").name,
i can get the proper name, so that's the point where I am lost
any help would be appreciated. thanks in advance.
a div tag inside another iframe that is inside a frame.
I have something like this (inside main.asp)
<DIV id="divHeader" name="divHeader"
style="position:relative;left:0;top:0;width:660;height:10;z-index:1">
<IFRAME NAME="iHeader" src="header.asp" frameborder=0
marginheight=0 marginwidth=0 width=100% height=100%
scrolling=no></IFRAME>
</DIV>
inside header.asp
<DIV id="divAccounts" name="divAccounts"
style="position:relative;left:0;top:0;width:100%;height:69;z-index:1">
<iframe id="iAccounts" name="iAccounts" src="somewhere.asp"
width="100%" height="69" frameborder="0" scrolling="yes" align="top"
marginwidth=0 marginheight=0 hspace=0 vspace=0></iframe>
</div>
I'm trying to do this...
top.document.getElementById("divHeader").document.getElementById("iHeader").document.getElementByID("divAccounts").offsetLeft
or
top.document.getElementById("divHeader").document.getElementById("iHeader").document.getElementByID("iAccounts").offsetLeft
it just gives me an error.
when i do
top.document.getElementById("divHeader").document.getElementById("iHeader").name,
i can get the proper name, so that's the point where I am lost
any help would be appreciated. thanks in advance.