:: Home >>

setId

Sets the unique ID for this object.

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

11 Apr 08
Is it possible to change ID onfly Oddbjørn (5)
12 Oct 07
No Hyphens in ID John Mason (1)

Comments will appear on this page and in the main forum.

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