PDA

View Full Version : plz help using java script on IE browser close



raj123
06-21-2008, 06:19 AM
HIiiiiiiiiiiiiii

I have a problem in java script like when i want to close browser on using the follownig code confirm box is opening, after click 'ok' its going on to close the window and the 'cancel' option is working fine ..

now my problem is to handle 'ok' event and call my code[API] using 'href'

How can i track the 'ok' event ??

Thanks in advance!!!!!

<SCRIPT language=javascript>

function noExit() {

if((event.clientX >1000)||(event.clientY < -80)) {
return "You are not supposed to close this window";
}
//if((event.clientX > 500)||(event.clientY > -80)) {
//return "You are not supposed to close this window";
//}
}
window.onbeforeunload = noExit;

</SCRIPT>