Dojo_user
Dojo_user

Reputation: 281

Syntax for setting checkbox value(as checked) in dojo dynamically

How to set the value of a check-box to checked dynamically using dojo? In dojo toolkit site I saw it was written to use key value pair for setting the checkboxWidget but am unsure about the approach. Can someone please suggest?

Here is my approach but it doesnt work .How can I fix this?:

 checkboxWidget.set("","checked");

Upvotes: 1

Views: 3832

Answers (1)

springrolls
springrolls

Reputation: 1331

If you use set to assign a value to a property, the first parameter is the property name followed by the value.

checkboxWidget.set("checked", checkedValue);

Upvotes: 3

Related Questions