Object Functions1. Introduction |
|
Join the DiscussionMore of this FeatureIf you are going to code some dynamic HTML (dHTML) for your web pages then you will probably be moving objects around the screen, resizing objects, and/or making them appear and disappear. You will need a way of determining where the object currently is on the screen, how big it is, and whether it is visible or not. If you want your script to work on as many browsers as possible you will also want to use code that is compatible with all three Document Object Models. To save you the effort of writing these functions yourself , I am supplying a set of eight functions that will provide this information for you. Let's take a look at the functions included in this library and the values that they hold at the time this page was first displayed. First, here's an object for us to reference.
test object
I gave the above div an id of "test" so that we can see what the other functions functions return by calling them as follows: If you are going to be creating dynamic effects using objects then you will need to obtain these functions so that you will know where on the page your objects currently are, how big they are, and whether they are visible.
Sample Page | Obtain the
Script | Add to Your
Scripts
|

