Javascript Alert on Exit Page

9 replies
I tried searching a bit but couldn't find anything to help me with this.

You know those sales pages that prompt if you're about to leave and you press okay/cancel, okay to leave, cancel to stay on the page. It has to be persistent too meaning they have to click it a couple of times.

Please let me know if you can help me out.

Charles
#alert #exit #javascript #page
  • Profile picture of the author charless
    $5 paypal to anybody who helps me out by the end of today!

    Much appreciated.
    Signature

    Working on three potentially large scale business projects backed by investors.
    If you'd like to chat or network with me, add me on Skype: charlesgmullen0.

    {{ DiscussionBoard.errors[7242781].message }}
  • Profile picture of the author charless
    ah, that's the correct term for it.

    thank you very much!
    Signature

    Working on three potentially large scale business projects backed by investors.
    If you'd like to chat or network with me, add me on Skype: charlesgmullen0.

    {{ DiscussionBoard.errors[7242810].message }}
  • Profile picture of the author webhosting
    You can use javascript - window.onbeforeunload.
    Signature
    {{ DiscussionBoard.errors[7242824].message }}
  • Profile picture of the author newbim
    Check out an old post of mine on here:

    http://www.warriorforum.com/website-...free-code.html

    it's free.
    Signature
    If what I said helps, let me know, throw me a 'thanks'.
    {{ DiscussionBoard.errors[7242825].message }}
  • Profile picture of the author newbim
    If memory serves, you can add it to more than one page as well so you can make it as persistent as you want it to be.
    Signature
    If what I said helps, let me know, throw me a 'thanks'.
    {{ DiscussionBoard.errors[7242838].message }}
    • {{ DiscussionBoard.errors[7243554].message }}
      • Profile picture of the author viescripts
        In fact all browsers try to avoid all kind of popups/exit ads/pop over ads etc.

        The theory of exit window is the following one:

        When someone is willing to exit the page, the unload page action is prevented and visitor is offered some other action, to stay or continue. If visitor decides to stay where they are a div of 100% width and 100% height with a iframe inside goes over the existing content.


        See the source below:

        Code:
        <!-- Start of ExitSplash.com Code -->
        <script language="javascript">
        var exitsplashmessage = "Some offer goes here";
        var exitsplashpage = "http://yoururlhere";
        </script>
        <script language="javascript" src="exitsplash.js"></script>
        <!-- End of ExitSplash.com Code -->
        Code is open source, taken from ExitSplash.com website.

        I have used this code on several websites, if you need any help with integration, let me know.

        See the exitsplash file attached.
        {{ DiscussionBoard.errors[7246423].message }}
  • Profile picture of the author charless
    thanks.....
    Signature

    Working on three potentially large scale business projects backed by investors.
    If you'd like to chat or network with me, add me on Skype: charlesgmullen0.

    {{ DiscussionBoard.errors[7252090].message }}

Trending Topics