PDA

View Full Version : Java script needed.



chetanmadaan
04-23-2008, 04:26 PM
Hi i need a javascript which will prompt the users while they close the page with a option of cancel and ok.

like you can see a example on this page...

http://forexautopilot.com/?DFresubmit=539514618
i am not with this link... just got this as a sample.

BYK
04-23-2008, 04:31 PM
That was really annoying but here is the code:


window.onbeforeunload=function(){return "Please do not go, will you?";};

boogyman
04-23-2008, 05:25 PM
if you just want to ask if they really want to leave the page or not, you could also do that through a link



<a href="/path" onclick="return confirm('Are you sure you want to leave?');">Link</a>

chetanmadaan
04-23-2008, 05:26 PM
Thank you sir... that was really appericated.