Welcome to TalkGraphics.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2020
    Posts
    1

    Default Exit Intent (pop-up on exit)

    I've found some useful javascript code which will run and generate a modal pop up window if the user starts to move the mouse to exit the form (using the "mouseleave" event). My question is how to embed that into my web page using Xara Designer pro. Can it be done using a widget?

    Any advice or pointers gratefully accepted.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,823

    Info Re: Exit Intent (pop-up on exit)

    Quote Originally Posted by tonyb0709 View Post
    I've found some useful javascript code which will run and generate a modal pop up window if the user starts to move the mouse to exit the form (using the "mouseleave" event). My question is how to embed that into my web page using Xara Designer pro. Can it be done using a widget?

    Any advice or pointers gratefully accepted.
    I would try putting the code inside <SCRIPT></SCRIPT> tags within the Page code (head).

    It is one of the most annoying things you can put on a site next to instant sounds being played.

    The type of jQuery coding is typically:
    Code:
    var popupCounter = 0;
    
    $(document).mouseleave(function () {
       if (popupCounter < 1) {
           alert("Please don't close the tab!");
       }
       popupCounter ++;
    });
    Of course, being Xara users, we would invoke a Pop-up Layer instead of a simple alert.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •