Disable X in Dojo Dialog

I found a trick to disable [x] on the top right corner of dojo dialog and force user to click on the close button to close the dialog box. Create a div element in your html web page and pass its id to following function to achieve this:

7 thoughts on “Disable X in Dojo Dialog

  1. Awesome information. I was having a hard time with this, since although I was able to hide the button from css, the user could still click on it. This fit perfectly.

  2. Or you could just use dojo.style like this:

    var mb = dijit.byId(“dialogID”);
    dojo.style(mb.closeButtonNode, “visibility”, “hidden”);

Leave a Reply

Your email address will not be published. Required fields are marked *