Jump to content

Recommended Posts

yo,

id like to have this such of javascript. on my website, there is a payed section where clients can log-in. but, they can log-in only one time. which means that when someone accidentally closes the window, he has to pay again to be able to get into the payed section. i dont want to discuss the cons/pros of this solution. i made a decission and its how it works.

 

what i would like to do is a confirmation box which popups when someone presses the close button (or alt+f4 etc). it should ask if one really wants to leave or not. something similiar runs on google mail, when you start composing a new mail and accidentally try to close the browser, it asks you whether you really want to or not.

 

thanx for any help.

Link to comment
https://forums.phpfreaks.com/topic/215033-ask-before-closing-window/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.