Question:

Need help with a website...

by  |  earlier

0 LIKES UnLike

Im making a website and im wondering how to get the Things to pop up when they try to close the site. Example. www.smouch.net/lol WARNING <THIS SITE MAY BE ANNOYING BUT IT EVENTUALY ENDS.>

anyone know how to let me know pleeeeeeeeeease THANKS!

 Tags:

   Report

2 ANSWERS


  1. you use javascript.

    -------------------------

    learn it @ w3schools.com


  2. Why would you want to do that? It&#039;s terribly annoying.

    Anyway, there&#039;s no reliable way to know when the user is closing their browser window. You could use JavaScript (not Java, there&#039;s a big difference) to open a new window and then monitor that window for a close event. You can also try using the onUnload or onBeforeUnload function, but you should be aware that the onUnload event will fire when the user browses away to another page, clicks a submit button (if one exists on your page, of course), or reloads the page. In any case, you&#039;ll need to use JavaScript. If you don&#039;t know it, learn it! ;) Do a Google search for onClose or onUnload. I&#039;m sure you&#039;ll find a lot of information relative to what you&#039;re trying to do and possible implementations.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.