Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Oct 2019
    Location
    Florida, United States
    Posts
    23

    Default Delayed popup with sticky/stretchy items?

    Hello,

    I am trying to create a delayed popup that "grays" out the main website and has some element on top of the gray box, similar to the delayed popup email subscribe form on this website:

    https://www.targetmarketingmag.com/

    Click image for larger version. 

Name:	blackout.jpg 
Views:	61 
Size:	109.1 KB 
ID:	127146

    I have extremely limited Javascript knowledge, but I've been able to use the code I found from Acorn on this forum with his Fancy OnLoad Pop-up found on this thread:
    https://www.talkgraphics.com/showthr...p-Please-Popup


    The delay coding works, but only if the popup layer has no sticky/stretchy items. Because our main website has a sticky navigation menu, the nav bar shows on TOP of the transparent black box. This isn't the ideal design choice. If I add sticky or stretchy to any of the items, the popup never shows.

    See my test site here:
    https://www.igcshow.com/TESTSITES/kelly_jun02/

    Is there a way to have sticky/stretchy objects on the popup layer with the Javascript for a delayed popup load? Or is there another way to achieve this look/feature that I'm unaware of?

    Thank you for any help!
    -Kelly

  2. #2
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Delayed popup with sticky/stretchy items?

    The element with the name "darkreg" may not be stickie or stretchy, then it should work. Otherwise the code could be adapted to assume a stickie or strechy.
    For example if it is stickie and has a link then the following code should work:
    Code:
    setTimeout("xr_cpu("+parseInt(document.getElementById('darkreg').parentNode.parentNode.parentNode.parentNode.className.split("xr_xp")[1])+")",3000);

  3. #3
    Join Date
    Oct 2019
    Location
    Florida, United States
    Posts
    23

    Default Re: Delayed popup with sticky/stretchy items?

    Siran,

    Thank you so much for your reply!

    I made sure the grayed out box does not have the name darkreg - it's only on the group with the green box - and made the gray box sticky.

    The green box shows up, but the sticky gray box does not.

    So then I tried the new script code you provided and the entire popup layer does not show at all.

    -Kelly

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,746

    Default Re: Delayed popup with sticky/stretchy items?

    Kelly, the problem you have created is any access to the Home page will always fire up the delayed pop-up.
    You then lose customers.

    Just add it in as a special button or rely on the REGISTER button as it goes to the same page.

    Personally, I would shift the REGISTER page to become the first page (call it index though) and have a meta refresh in the REGISTER page code head to switch to the HOME page (renamed from index) after 30 seconds.
    <metahttp-equiv="refresh"content="30; url=home.htm">
    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

  5. #5
    Join Date
    Oct 2019
    Location
    Florida, United States
    Posts
    23

    Default Re: Delayed popup with sticky/stretchy items?

    Acorn,

    The popup may not always be a box about registering - that was just an example I am using to get the functionality to work.

    We may end up using a popup similar to the original example I sent from TargetMarketing where it is an email subscription form.

    But I don't make those design decisions. I am just the layout person/Xara user trying to make the "can we do this in Xara" requests from my boss happen.

    Thank you for your input, though. It's definitely something I should address with my boss if the need arises.

    -Kelly

  6. #6
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Delayed popup with sticky/stretchy items?

    If the element with the name doesn't have a link you have to remove one of the four ".parentNode" parts (see example).
    Attached Files Attached Files

  7. #7
    Join Date
    Oct 2019
    Location
    Florida, United States
    Posts
    23

    Default Re: Delayed popup with sticky/stretchy items?

    Siran,

    But the item with the "darkreg" name DOES have a link.

    I tried removing one of the four ".parentNode" parts anyway, just to test, and it still didn't trigger the popup.

    So, I copied the contents of your popup layer and your HTML code to my Xara file, removing my green call to action box, but leaving the little white x from my original green box to close the popup (with a link to "popup: close "reg(lock)"") and the popup works now, with the stretchy gray box.

    But the white x to close the button does not show.

    I'm getting closer!

    Thank you,
    -Kelly

  8. #8
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Delayed popup with sticky/stretchy items?

    Can you attach a simple design file that reproduces your problem?
    Is your profile up to date, are you using Designer Pro X 15?

  9. #9
    Join Date
    Oct 2019
    Location
    Florida, United States
    Posts
    23

    Default Re: Delayed popup with sticky/stretchy items?

    Siran,

    Here is your sample file with my close button added to the popup layer.

    delpopstick-withclose.xar

    Hopefully this works!

    And yes, my profile is up to date. I'm using Xara Designer Pro 15.1.0.53605.

    I do have the service contract and can get the latest version. I just don't use it because my boss has version 15 and we share the Xara files sometimes.

    Thank you.
    -Kelly

  10. #10
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,746

    Default Re: Delayed popup with sticky/stretchy items?

    Kelly, you must understand that you get this popup each and every visit to the home page. That's a disaster waiting to happen.

    You can scroll past the popup as well as the NavBar and Stickies being over the popup.

    You will be chasing fixes all the way down.

    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

 

 

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
  •