I'm trying to get a script to work where if the browser is closed or they leave this site. They get a conf message. (Are you sure you want to leave, Y/N)
Code:$hdisplay .= "<script language='javascript'>\n"; $hdisplay .= "function onFeforeUnloadAction(){\n"; $hdisplay .= "var flag\n"; $hdisplay .= "var mesg ='You are closing the window. do you want to continue. Click Ok to close or click Cancel to stay back';\n"; $hdisplay .= "return mesg;\n"; $hdisplay .= "}\n"; $hdisplay .= "window.onbeforeunload = function(){if((window.event.clientX<0) || (window.event.clientY<0)){ return onBeforeUnloadAction();}\n"; $hdisplay .= "</script>\n";


Reply With Quote
Bookmarks