javascript - How do you check a checkbox without firing a change event? -
i have simple checkbox:
r = new ext.form.checkbox({ listeners: { check: function(checkbox, checked) { } } } r.setvalue(true);
how check checkbox without fireevent check ( want fireevent check mouse click ) ? (setvalue doesn't work ).
you should suspend events before set value , resume events after this. example:
mycheckbox.suspendevents(false); // stop events. //be careful it. dont forget resume events! mycheckbox.setvalue(!mycheckbox.getvalue()); // invert value mycheckbox.resumeevents(); // resume events
Comments
Post a Comment