Check documentation for the latest version of dhtmlxSuite onBeforeHide DHTMLX Docs


fires before a popup is hidden, cancelable

void onBeforeHide(string type,Event ev,string|number id){ ... };


typestring"click", "esc" or "select" - specifies the reason why a popup will be hidden (see details)
evEventa native event object
idstring|numberthe id of the clicked item, for the select type only


myPop.attachEvent("onBeforeHide", function(type, ev, id){
    return true; // return false;

  • "click" - the user has clicked on the document body outside the popup
  • "esc" - the user has pressed the Esc key
  • "select" - when a list is attached to the popup - the user has selected any option from the list

The event is cancelable, returning false will prevent hiding

Back to top