javascript - Detect manually vs programmatic change in checkbox state ExtJS 4.1 -



javascript - Detect manually vs programmatic change in checkbox state ExtJS 4.1 -

i'm using checkbox component on extjs 4.1 application. set event on alter event , logic if checkbox checked or unchecked. problem have that, change event fires automatically on page load event if user has not checked checkbox manually.

does know how can observe if checkbox value (checked or unchecked) has been alter user or how prevent alter event firing automatically on page load?

thanks in advance help

you can utilize dirtychange event

you can check checkbox.isdirty() parameter

class="snippet-code-js lang-js prettyprint-override">//function called on alter event onchange: function() { if (checkbox.isdirty() { //do something(option 1) } else { //do nothing(option 2) } }

javascript extjs extjs4.1

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -