150 Part III (Web design company) .Document Objects Reference To guarantee
150 Part III .Document Objects Reference To guarantee that an element gets only one ID assigned to it while the object exists in memory, assign the value via the uniqueIDproperty of that same object not some other object. Once you retrieve the uniqueID property of an object, the property s value stays the same no matter how often you access the property again. In general, you assign the value returned by the uniqueIDproperty to the object s id property for other kinds of processing. (For example, the parameter of a getElementById() method requires the value assigned to the id property of an object.) Example (with Listing 15-18) on the CD-ROM Related Items: id property; getElementById() method. Methods addBehavior( URL ) Returns: Integer ID. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility The addBehavior() method imports an external Internet Explorer behavior and attaches it to the current object, thereby extending the properties and/or methods of that object. See Chapter 48 for details on IE behaviors (new in IE5 for Windows). The sole parameter of the addBehavior() method is a URL pointer to the behavior component s code. This component may be in an external file (with an .htc extension), in which case the parameter can be a relative or absolute URL. IE also includes a library of built-in (default) behaviors, whose URLs are in the following format: #default#behaviorName Here, behaviorName is one of the default behaviors (see Chapter 48). If the behavior is imported into the document via the OBJECT tag, the addBehavior() method parameter is the ID of that element in the following format: #objectID When you add a behavior, the loading of the external code occurs asynchronously. This means that even though the method returns a value instantly, the behavior is not necessarily ready to work. Only when the behavior is fully loaded can it respond to events or allow access to its properties and methods. Behaviors loaded from external files observe domain security rules. The behavior component and the HTML page that loads it must come from the same server and domain; they also must load via the same protocol (for example, http://, https://, and file:// are mutually exclusive, mismatched protocols). On the CD-ROM elementObject.addBehavior()
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.