Possible Duplicate:
How do you prevent javascript page from navigating away?
How do I stop a page from unloading (navigating away) in JS?
I have been on several websites, sorry I cant provide the url, that do not let you leave. No matter what you do, besides force quitting (closing the page, navigating to a new url, regular quitting, you cant leave). These websites always have an alert box that asks you a question like: "do you want to leave?" but both answers (yes and cancel) leave you back on their page. I would just like to know how they do this. will not use this in my website, I am not a spammer just wondering