I work with onbeforeunload to display a message with text area when closing pages, the problem is I am getting the message but not the text. The code I am using is :
window.addEventListener("beforeunload", function(event) {
var response = prompt("Whay this page isn't good for YOU ?", "");
//put the response in log file
//Exit the page
});
i tried so hard to get the prompt but no result.