You are here: Reference > JavaScript > client-side > browser > methods > setAttribute (userProfile)

setAttribute method (userProfile)

Browser support:
9
Adds an attribute with the specified name and value to the current userProfile object.
The entire userProfile object, and therefore the setAttribute method as well, are deprecated and the support for them has been removed in Internet Explorer 9.
If an attribute with the same name exists, then this method modifies its value.

Syntax:

object.setAttribute (vCardName, vCardValue [, caseSens]);
You can find the related objects in the Supported by objects section below.

Parameters:

vCardName
Required. String that specifies the name for the vCard.
For a complete list of vCard names, see the appendix.
vCardValue
Required. String that specifies the value of the vCard.
caseSens
Optional. Integer that specifies the case-sensitivity for the name of the attribute.
One of the following values:
0
The first attribute with the specified name, regardless of its case, will be overwritten.
1
Default. The first attribute with the specified name, depending on its case, will be overwritten.

Return value:

This method has no return value.

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content