urns Method

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
taintEnabled Method     write Method     DHTML Methods    

urns Method


Retrieves a collection of all objects to which a specified behaviorInternet Link is attached.

Syntax

collObjects = object.urns(sUrn)

Parameters

sUrnRequired. String that specifies the behavior's Uniform Resource Name (URN).

Return Value

Returns a collection of objects if successful, or null otherwise.

Remarks

This method returns an empty collection if no element has the specified behavior attached to it.

Use the length property on the collection to determine the number of elements it contains, and the item method to obtain a particular item in the collection.

Example

This example uses the urns method to retrieve a collection of all elements currently attached to the specified behavior, and then displays a comma-delimited list of IDs of the elements in a message box.

<SCRIPT LANGUAGE="JScript">
var coll  = document.all.urns("URN1");
var sText = '';

if (coll != null)
{
    for (i=0; i<coll.length; i++) 
	   sText += coll.item(i).id + ', ';

    window.alert (sText);
}
</SCRIPT>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
all, anchors, applets, areas, boundElements, cells, childNodes, children, elements, embeds, FORM, forms, images, links, options, rows, scripts, SELECT, stylesheets, tbodies

See Also

behaviorUrns


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.