I have a popup in my page.
I want to implement separate functionality for the close(X) button on this popup without affecting the other buttons in this popup.
I already tried the onunload() and onbeforeunload() events, but they are affecting the other buttons in the popup.