Confirm closing Dojo Dialog


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var dlg = new dojox.widget.DialogSimple(...);
  2.  
  3. dlg.orgHide = dlg.hide;
  4. dlg.hide = function () {};
  5. dojo.connect(dlg, "onCancel", function(e){
  6. if (confirm("Really close?"))
  7. this.orgHide();
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.