Archive for August, 2007

JavaScript Programmer’s Reference The attributes collection that belongs

Friday, August 31st, 2007

JavaScript Programmer’s Reference The attributes collection that belongs to an object also tells you what the expected complete set of attributes are for the tag, although this may not be completely reliable. The example script demonstrates how you can make an Attribute object inspector with a fragment of JavaScript. These inspectors can be put into a library and called in for debugging when you are experiencing problems. Note that the example overleaf does not work on Netscape 6.0 due to the use of the all property. Example code: See also: Attr object, Attributes object, Document.createAttribute(), Element.getAttributeNode(), Element.removeAttribute(), Element.removeAttributeNode(), Element.setAttributeNode(), HasProperty(), HTML tag attribute, MutationEvent.attrChange, MutationEvent.attrName

Make my own web site - A Attribute object (Object/DOM) Inherits from: Node

Friday, August 31st, 2007

A Attribute object (Object/DOM) Inherits from: Node object JavaScript syntax: -myAttr = myDocument.createAttribute(aName) Argument list: aName The name of the attribute to create The DOM level 2 standard adds an ownerElement property to the Attr object specification. This is not yet supported in browsers. See also: Attribute object, Document.createAttribute() Inheritance chain: Node object Attribute object (Object/DOM) A DOM object that represents an HTML tag attribute. Availability: DOM level 1 JavaScript 1.5 JScript 5.0 Internet Explorer 5.0 Netscape 6.0 Inherits from: Node object -myAttribute = myAttributes.aPropertyName -myAttribute = myAttributes[anIndex] -myAttribute = myAttributes[aName] JavaScript syntax: -myAttribute = myDocument.createAttribute(aName) aPropertyName The name of the tag attribute aName An attribute name Argument list: anIndex A valid numeric reference to an element in the collection Object properties: name, nodeName, nodeType, nodeValue, specified, value This is used by the browser to maintain property values for HTML tag instantiated objects. This object represents a single HTML tag attribute. The properties of this object indicate whether the tag attribute has been specified or not, and if it has, what the current value is. The Element object should contain enough information for you to be able to determine the instantiating source tag name. The attributes can be inspected with a script and the complete source HTML reconstructed from a combination of the information supplied by the element and its associated attributes collection.

Make a web site - JavaScript Programmer’s Reference atob() (Method) Decode some base-64

Thursday, August 30th, 2007

JavaScript Programmer’s Reference atob() (Method) Decode some base-64 encoded data. JavaScript 1.2 Availability: Netscape 4.0 Property/method value type: String primitive JavaScript syntax: N atob(aBase64String) N myWindow.atob(aBase64String) Argument list: aBase64String A string containing base 64 encoded data See also: Window.btoa() attachEvent() (Method) A means of attaching events to windows and documents. JScript 5.0 Availability: Internet Explorer 5.0 Property/method value type: Boolean primitive JavaScript syntax: attachEvent(anEventName, anEventHandler) IE myWindow.attachEvent(anEventName, IE anEventHandler) Argument list: anEventHandler A reference to an event handler function anEventName The name of an event to be handled .htc,