I am using this code:
$(\'body\').click(function() { $(\'.form_wrapper\').hide(); }); $(\'.form_wrapper\').click(function(event){ event.stopPropagatio
dojo.query(document.body).connect('mouseup',function (e) { var obj = dojo.position(dojo.query('div#divselector')[0]); if (!((e.clientX > obj.x && e.clientX <(obj.x+obj.w)) && (e.clientY > obj.y && e.clientY <(obj.y+obj.h))) ){ MyDive.Hide(id); } });