Check documentation for the latest version 6.0 of dhtmlxSuite onBeforeHide DHTMLX Docs

onBeforeHide

fires before a popup is hidden, cancelable

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

Parameters

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

Example

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

Details
  • "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