Search DaTutorials:  
HOME
DHTML Reference
Introduction
Reference

item Method


Retrieves a namespace object from the namespaces collection.

Syntax

oItem = namespaces.item(vIndex)

Parameters

vIndex Required. Integer or String that specifies the namespace to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, the namespace matching the string is retrieved.

Return Value

Returns a namespace if successful, otherwise null.

Examples

This example uses the item method to retrieve a namespace from the namespace collection, import an element behavior, and dynamically add the element behavior to the document.

<HTML XMLNS:xx>
<HEAD>
<SCRIPT>
function Init()
{
    oNSColl = document.namespaces;
    oNS = oNSColl.item("xx");
    oNS.doImport("editBox.htc");
    oElem = document.createElement("xx:editBox");
    document.body.appendChild(oElem);	
}
</SCRIPT>
</HEAD>
<BODY onload="Init()"></BODY>
</HTML>

Applies To

namespaces

     Online Advertising | Loans | Debt Consolidation | Sales management | PSD to HTML
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp