Re: get_offsetTop always return zero?
- From: michael66 <hanfeifei@xxxxxxxxx>
- Date: Fri, 03 Aug 2007 14:33:29 -0000
On Aug 3, 7:51 pm, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
"michael66" <hanfei...@xxxxxxxxx> wrote in message
news:1186130276.627739.314820@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I have tried to retrieve the element in mutiframes page by
elementFromPoint(..) and offsetTop offsetLeft offsetParent. It works
very well except for the page like MSDN site style. For example,
http://msdn2.microsoft.com/en-us/library/aa752286.aspx
At that MSDN page, offsetTop and offsetLeft always return zero
... when called on which element?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Hi Igor,
Thank you for your reply. I think the question description is not very
clear in my last post. I have seen the given post by you before and
already followed the way you mentioned in my project. The situation I
encountered is very strange. I follow the way in my project for
retrieving the element from the FRAME's DOCUMENT and it works very
well on many sites (i.e. W3school site), but it does not work on
several sites (i.e. MSDN site).
The sites it works:
http://www.w3schools.com/tags/tag_iframe.asp
http://images.google.com/xxx
The sites it does not works:
http://msdn2.microsoft.com/en-us/library/aa752286.aspx
For the above MSDN site, I need to retrieve the element(Tag:A) from
left tree-view frame by a click. I adjust the click-point(x,y) by
calling get_offsetTop, get_offsetLeft and get_offsetParent, but I find
they get strange this time. get_offsetTop & get_offsetLeft always
return zero so that the click-point(x,y) does not get changed.
However, I also tried get the frame's screen-topleft point by
get_screenTop & get_screenLeft and
call ::ScreenToClient(hIEserverWnd), unfortunately the result is
point(0,0), it equals to the main frame's topleft corner. On the above
MSDN page, I always get the <A>onclick</A> when I basically clicks
<A>offsetHeight</A> in the left tree-view frame.
Please help me, it makes me nut.
Thank you for your time!
Michael
.
- References:
- get_offsetTop always return zero?
- From: michael66
- Re: get_offsetTop always return zero?
- From: Igor Tandetnik
- get_offsetTop always return zero?
- Prev by Date: Re: get_offsetTop always return zero?
- Next by Date: NewWindow2 signature
- Previous by thread: Re: get_offsetTop always return zero?
- Next by thread: Re: get_offsetTop always return zero?
- Index(es):