Free web space - 161Chapter 15 .Generic HTML Element Objects A key
161Chapter 15 .Generic HTML Element Objects A key aspect of this method is that you invoke it on any element that you want to use as the point of reference. For example, if you want to find out if a mouseup event occurs in an element whose ID is myTable, invoke the method as follows: var result = document.all.myTable.componentFromPoint(event.clientX, event.clientY) Parameters passed to the method are x and y coordinates. These coordinates do not have to come from an event, but the most likely scenario links this method with an event of some kind. Mouse events (other than click) work best. The value returned by the method is a string that provides details about where the coordinate point is with respect to the current element. If the coordinate point is inside the element s rectangle, the returned value is an empty string. Conversely, if the point is completely outside of the element, the returned value is the string out- side . For scrollbar pieces, the list of possible returned values is quite lengthy (as shown in Table 15-8). Microsoft defines additional values representing pieces of element resizing handles when the browser is set to what the company calls DHTML authoring mode in Windows. This mode involves a special ActiveX control that is outside the scope of this book. Table 15-8 lists these extra values just the same. Table 15-8 Returned Values for componentFromPoint() Returned String Element Component at Coordinate Point scrollbarDown Scrollbar down arrow scrollbarHThumb Scrollbar thumb on horizontal bar scrollbarLeft Scrollbar left arrow scrollbarPageDown Scrollbar page-down region scrollbarPageLeft Scrollbar page-left region scrollbarPageRight Scrollbar page-right region scrollbarPageUp Scrollbar page-up region scrollbarRight Scrollbar right arrow scrollbarUp Scrollbar up arrow scrollbarVThumb Scrollbar thumb on vertical bar handleBottom Resize handle at bottom handleBottomLeft Resize handle at bottom left handleBottomRight Resize handle at bottom right handleLeft Resize handle at left handleRight Resize handle at right handleTop Resize handle at top handleTopLeft Resize handle at top left handleTopRight Resize handle at top right elementObject.componentFromPoint()
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.