CD-548 Part VI . Appendixes Listing 29-14 (continued) (Web hosting providers)

CD-548 Part VI . Appendixes Listing 29-14 (continued) offsetX, offsetY: screenX, screenY: x, y: …Relative to:


Window Resize Coordinates: clientX, clientY:
Here are some tasks to try with the page that loads from Listing 29-14 to help you understand the relationships among the various pairs of coordinate properties: 1. Click the dot above the i on the Click Here button label. The target element is the button (INPUT) element, whose offsetParent is a table cell element. The offsetYvalue is very low because you are near the top of the element s own coordinate space. The client coordinates (and x and y), however, are relative to the viewable area in the window. If your browser window is maximized in Windows, the screenX and clientXvalues will be the same; the difference between screenY and clientYis the height of all the window chrome above the content region. With the window not scrolled at all, the client coordinates are the same with and without scrolling taken into account. 2. Jot down the various coordinate values and then scroll the page down slightly (clicking the scrollbar fires an event) and click the dot on the button again. The clientY value shrinks because the page has moved upward relative to the viewable area, making the measure between the top of the area smaller with respect to the button. The Windows version does the right thing with the offset properties, by continuing to return values relative to the element s own coordinate space; the Mac, unfortunately, subtracts the scrolled amount from the offset properties. (IE) event.clientX
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply