164
rated 0 times
[
165]
[
1]
/ answers: 1 / hits: 21353
/ 13 Years ago, tue, august 23, 2011, 12:00:00
I have a handler for onbeforeunload
window.onbeforeunload = unloadMess;
function unloadMess(){
var conf = confirm(Wait! Before you go, please share your stories or experiences on the message forum.);
if(conf){
window.location.href = http://www.domain.com/message-forum;
}
}
but I'm not sure how to know if the url they clicked on the page is within the site.
I just want them to alert them if they will leave the site.
More From » jquery