confirmation page

by 2 replies
3
I have figured out how to create my confirmation page and download page. The question that I have is to create a page that redirects to a downsell page in case they don't want it. It's too high priced or something but then I want a page that is a downsell.
So, how do I create this system. The other question is how to create the code for stay on this page.How do I set these up?
#website design #confirmation #page
  • you should create 2 divs:

    <div id="home">...</div> (here you have your sales message or confirmation code)
    <div id="backup">..</div> (here you have your down-sale message code)

    the second div has to be hidden --> style="display:none"

    then you need to setup a JS script where you define the function:

    window.onbeforeunload

    this is a native JS function for the page. If you add code to this function something will happen when the user try to press the close button---> this trigger the onbeforeunload event of the current window.

    Then in this code you need to open a message using the alert function alert("Please wait...");

    then in this function you should now hide the first div and make visible the second...
    something like:

    window.onbeforeunload=askwhatsnext;

    where askwhatsnext---->

    function askwhatsnext(){
    alert("please wait....");
    document.getElementById("home").style.display="non e";
    document.getElementById("backup").style.display="" ;
    }

    add this script at the bottom of your HTML code just before the tag </body>

    Please let me know if you need more details
    • [1] reply
    • Thank you for the code Dan very much appreciated.

Next Topics on Trending Feed

  • 3

    I have figured out how to create my confirmation page and download page. The question that I have is to create a page that redirects to a downsell page in case they don't want it. It's too high priced or something but then I want a page that is a downsell. So, how do I create this system. The other question is how to create the code for stay on this page.How do I set these up?