CHAPTER 3 CONTENT CHUNKING PATTERN 69 Table (Web hosts)
Sunday, May 6th, 2007CHAPTER 3 CONTENT CHUNKING PATTERN 69 Table 3-1. HTML Element Properties Useful for Writing Scripts Property Identifier Description disabled Enables (false) or disables (true) an element. Useful when the script does not want a user to click a certain button or other GUI element before completing a required step. firstChild, lastChild Retrieves either the first child node or the last child node. id Is the identifier of the element used to find a particular element. For example, this property is referenced when a script calls the method getElementById. nextSibling, previousSibling Retrieves either the next or previous sibling. When used in combination with firstChild and lastChild, can be used to iterate a set of elements. This approach would be used to iterate a list in which the element is responsible for indicating what the next element should be for example, when implementing a Decorator pattern or similar structure. nodeName Contains the name of the element, which in HTML means the tag (for example, td, table, and so on). nodeType Contains the type of element but is geared for use when processing XML documents. With respect to HTML, this property has very little use. nodeValue Contains the value of the data in the node. Again, this property has more use when processing XML documents. With respect to HTML, this property cannot be used as a replacement for innerHTML. parentElement Retrieves the parent element for the current element. For example, can be used to navigate to the table that contains a row cell. style Identifies the current style properties associated with the element and is an instance of CSSStyleDeclaration type. tabIndex Defines the tab stop of the element with respect to the entire HTML document. tagName Identifies the tag of the current element. Use this property when attempting to figure out the element type after the element has been retrieved via the method getElementById. Binary, URL, and Image Chunking Chunking binary or images in their raw form using the XMLHttpRequest object is rather complicated because the data that is read turns into gibberish. The XMLHttpRequest properties responseText and responseXML expect either text or XML, respectively. Any other data type is not possible. Of course there is an exception: Base64-encoding binary data that is encoded as text, and then retrieving the text by using the XMLHttpRequest object. Another solution is not to manage the binary data but to manage the reference of the binary data. In the case of the img tag, that means assigning the src attribute to where an image is located. Images are downloaded indirectly. To understand how this works, consider an application that uses XMLHttpRequest to retrieve a document containing a single line. The single line is a URL to an image file. Here is the implementation of the example program:
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision personal web hosting services