Hi I have trouble setting the new button to disabled. I am using Dojo 1.8
See my code below:-
require(["dojo/parser", "dijit/layout/BorderContainer",
"dijit/form/Button","dojo/on","dijit/form/Select",
"dojo/store/Memory", "dojo/request","dojo/domReady!"
],
function(parser, BorderContainer, Button, on, Select, Memory, request)
{
var btn4 = new Button // Button, not button
({
label: "Number of cards",
this.set("disabled", false) // This code that disables the button
},"btn4");
btn4.startup();
})
I cannot find help in Dojo or google for it.
Just set disabled: true in your argument list to the Button dijit. var btn4 = new Button({ label: "Number of cards", disabled: true, }, "btn4");
In Dojo many things are other as you would expect.
Button have method setDisabled
:
btn4.setDisabled(true) // disable
btn4.setDisabled(false) // enable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With