:: Documentation >>

setId

Sets the unique ID for this object.

null

Syntax

obj.setId(id);

Parameters

id (string) - new unique id for the object

Example

obj.setId("myObject");

Remarks

The id should contain only alphanumeric characters and start with a letter.

If id is not specified - it will be assigned automatically. However you have to know object id in order to modify its visual style via CSS, so it helps to set it explicitly.

See also

getId() method

Comments

Is it possible to change ID onfly Oddbjørn (5)
No Hyphens in ID John Mason (1)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5