395507 Exit Javascript

In Progress


1) Excellent English. This is a must. If your English sucks, don't bother! (and I will be able to tell if it sucks from your message to me)

2) Excellent Javascript skills.

3) Great attitude.

Project description is below and a sketch is attached.


The purpose of the project is to give the websurfer one last chance to not leave my web page. It will use "onbeforeunload" function of Javascript.

Here's how it works:

1) The script will activate if the websurfer press BACK button on his browser or the "X" Close Window button. It will NOT activate if the websurfer clicked on one of the links on my web page.

2) After the user attempts to exit the page, prompt #1 will popup.

3) Prompt #1 will say something like "You shouldn't leave this webpage. It's really good. Etc." The websurfer will only have the option to click "OK" at this prompt.

4) After the websurfer clicks "OK", he will get Prompt #2 which will say:

"Are you sure you want to navigate away from this page?" <- this is default text and cannot be changed

"*some sample custom text here*"

"Press OK to continue or Cancel to stay on the current page" <- this is default text and cannot be changed

The websurfer will have a choice to click "OK" or "Cancel". If he clicks "OK" then he exits the webpage. If he clicks "Cancel" he is automatically redirected to another URL (let's use [url removed, login to view] as an example).

VERY IMPORTANT: Clicking links on my webpage should NOT activate this script.

A working example of these two prompts can be seen at:

[url removed, login to view]

You may need to have a U.S. IP to see the example webpage properly. If you don't have U.S. IP, use U.S. VPN to see the example webpage.

Sketch outline of the project is attached.

Skills: Anything Goes, Javascript

See more: say anything you want, exit, onbeforeunload custom message, javascript url example, javascript exit popup script, browser current url, javascript etc, page exit message popup, description attitude, javascript url window, javascript exit function, javascript outline, javascript click webpage, button javascript, vpn click, onbeforeunload message custom, onbeforeunload exit, javascript click page, popup window javascript, current url browser, exit window script, javascript example, something vpn, javascript webpage, working vpn

Project ID: #2141361