All Tech Tips

nameProp Property

Retrieves the file name specified in the href or src property of the object.

Syntax

HTMLN/A
Scripting[ sFileName = ] object.nameProp

Possible Values

sFileNameString that receives the name of a file specified by the object, not including the path or protocol.

The property is read-only. The property has no default value.

Example

This example uses the nameProp property to set the innerText property of a link to the file name specified by an a element.

<SCRIPT>
window.onload=fnInit;
function fnInit(){
   oLink.innerText=oLink.nameProp;
}
</SCRIPT>
<A ID="oLink"
   HREF="http://msdn.microsoft.com/workshop/author/dhtml/dhtmlrefs.asp">
</A>

Standards Information

There is no public standard that applies to this property.

Applies To

A, IMG


Copyright © 2006 alltechtips.com. All rights reserved.

This website and the materials and information you find on this website are provided "as is", without warranty of any kind, either express or implied, including without limitation any warranty for information, services, or products provided through or in connection with the service and any implied warranties of merchantability, fitness for a particular purpose, expectation of privacy or non-infringement.