Code to clear a form without firing the onChange events on the inputs.
Code:
/* frmDijit.reset() */ | |
dojo.query('#frmForm input[class^=dijit]').forEach( | |
function(item) | |
{ | |
if ((d=dijit.byId(item.id))!=null) | |
switch(d.type) | |
{ | |
case 'checkbox': | |
case 'radio': | |
d.set('checked',false); | |
break; | |
case 'hidden': | |
case 'text': | |
d.set('value','',false); | |
break; | |
} | |
}); |