This is actually by design, as when it comes to a modal window, you should always provide your visitors with a fail safe way of closing the window. Otherwise, the entire page will be covered in a veil without recourse. For example, lets say your custom code to execute "onClose" contains an error, and this code is run by the default "x" button as well- the window will fail to close due to the error halting the rest of the button's execution.
However, if you still wish to have the "X' button react to your custom events, inside modalfiles/modal.js, find the line:
Code:
t.hide=function(){dhtmlmodal.close(this)} //OVERWRITE default t.hide() method with new one
and remove it. That should do it.
Bookmarks