dojo 1.6.1 Form.reset()
Code to clear a form without firing the onChange events on the inputs.
/* 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;
}
});
Print article | This entry was posted by elvis on 10/10/11 at 11:44:00 am . Follow any responses to this post through RSS 2.0. |