Changing button label on click

2085
2
Jump to solution
05-01-2012 07:56 AM
SamirGambhir
Occasional Contributor III
This should be fairly simple but I cannot figure it out. I am using dojo button in a form. I would like the button to change its label from ABC to DEF when clicked. I am trying to use dijit.byId(button id).label="DEF" but it does not seem to work. Any suggestions?
Thanks in advance
Samir
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
Use the button dijit's set method:
dijit.byId("T1465").set("label", "New Label");

View solution in original post

0 Kudos
2 Replies
derekswingley1
Frequent Contributor
Use the button dijit's set method:
dijit.byId("T1465").set("label", "New Label");
0 Kudos
SamirGambhir
Occasional Contributor III
Thanks Derek,
Samir
0 Kudos