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;
                                        }
                        });