The componentFromPoint Method


The componentFromPoint Method

The componentFromPoint method returns the component of an object located at specified coordinates. This method, available as of Internet Explorer 5.0, can be used with any object that can be given scrollbars through Cascading Style Sheets (CSS), and it's used to determine where in an object a point is. You can see the support for this method in Table 6.14.

Table 6.14. The componentFromPoint Method

Method

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

componentFromPoint( x, y )

             

x

x

x

 

Returns: String

You pass the client window X and Y coordinates of the point you want to check, and this method returns one of the following strings:

  • "" . Component is inside the client area of the object.

  • "handleBottom" . Bottom sizing handle is at the indicated location.

  • "handleBottomLeft" . Lower-left sizing handle is at the indicated location.

  • "handleBottomRight" . Lower-right sizing handle is at the indicated location.

  • "handleLeft" . Left sizing handle is at the indicated location.

  • "handleRight" . Right sizing handle is at the indicated location.

  • "handleTop" . Top sizing handle is at the indicated location.

  • "handleTopLeft" . Upper-left sizing handle is at the indicated location.

  • "handleTopRight" . Upper-right sizing handle is at the indicated location.

  • "outside" . Component is outside the bounds of the object.

  • "scrollbarDown" . Down scroll arrow is at the indicated location.

  • "scrollbarHThumb" . Horizontal scroll thumb or box is at the indicated location.

  • "scrollbarLeft" . Left scroll arrow is at the indicated location.

  • "scrollbarPageDown" . Page-down scrollbar shaft is at the indicated location.

  • "scrollbarPageLeft" . Page-left scrollbar shaft is at the indicated location.

  • "scrollbarPageRight" . Page-right scrollbar shaft is at the indicated location.

  • "scrollbarPageUp" . Page-up scrollbar shaft is at the indicated location.

  • "scrollbarRight" . Right scroll arrow is at the indicated location.

  • "scrollbarUp" . Up scroll arrow is at the indicated location.

  • "scrollbarVThumb" . Vertical scroll thumb or box is at the indicated location.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net