Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

how to detect browser close when 'X' clicked

Hi, this is on a internal web app with php/javascript and how could we detect when the browser app is closed when pressed X with javascript. Thanks.
0
nevyana2006
Asked:
nevyana2006
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
window.onbeforeunload = function() {
      return "noooooooo!!!!";
}

test page : http://jsfiddle.net/cfnjmk6L/
0
 
nevyana2006Author Commented:
regret that affects another function
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now