can we use both unload event & onbeforeuload in the same page?

In my application i'm using onbeforeunload event. when i'm try to navigate away from the page this message box comes up asking if you want to hit 'Ok' to continue on without saving or Cancel to stay on the current page. When you hit the 'Cancel' button however system just sits & Loading something. it takes much time. any one help me?
 
Back
Top