Welcome to TalkGraphics.com
Results 1 to 10 of 10

Thread: Pop up close

  1. #1
    Join Date
    Feb 2023
    Location
    England
    Posts
    118

    Default Pop up close

    I created a pop up layer with slide in from right, as soon as the home page loads.
    I now want to be able to close the layer with a popup:close button but i can't remember how.
    Thanks for any assistance.

  2. #2
    Join Date
    Dec 2018
    Location
    Australia
    Posts
    1,821

    Default Re: Pop up close

    Add (lock) to the end of the layer name. As in: layer_name(lock)
    On the same layer, create a button, or icon, or whatever you want to close the layer.
    In Web Properties Utilities > Web Properties > Link (tab) > Link To Web Or Email Address, type popup:close

  3. #3
    Join Date
    Feb 2023
    Location
    England
    Posts
    118

    Default Re: Pop up close

    Quote Originally Posted by Chris M View Post
    Add (lock) to the end of the layer name. As in: layer_name(lock)
    On the same layer, create a button, or icon, or whatever you want to close the layer.
    In Web Properties Utilities > Web Properties > Link (tab) > Link To Web Or Email Address, type popup:close
    Hi Chris. Thank you very much for the quick reply. I did exactly that but it doesn't seem to work. All work fine except the popup:close button.
    No matter what i tried, it staying unresponsive. The layer not closing.
    Any ideas what may causing this. Thank you.

  4. #4
    Join Date
    Dec 2018
    Location
    Australia
    Posts
    1,821

    Default Re: Pop up close

    Probably the best designed site I've ever made.

    Just a button to open the layer, and a button to close. Check the layer name and the text in the link box.

    >>> Andre7.xar <<<

  5. #5
    Join Date
    Feb 2023
    Location
    England
    Posts
    118

    Default Re: Pop up close

    If i open the layer with a button then the command "popup:close" works just fine. But if the layer open automatically with a reveal / scroll animation it can not be closed manually.
    The "popup:close only works if i open the layer with a link.
    What i missed or what i am doing wrong? Thanks for the xar example Chris but is not what i try to achieve. I need the layer to popup soon the home page load and then the visitor to be able to close manually. Thanks again
    And your design is fab...

  6. #6
    Join Date
    Dec 2018
    Location
    Australia
    Posts
    1,821

    Default Re: Pop up close

    My next step would be to ask for your project file, but sorry to say it's late here and my bed is comfy.

  7. #7
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,974

    Default Re: Pop up close

    I have embellished Chris's file.

    I threw away the open popup layer button. It can still be used but is not relevant to the redesign.
    I removed the (lock) popup layer name extension. Again, not needed.

    I added a Name of 'btn' to the Close button.

    I include some JS code in the Page Body:
    <script> xr_v1(document.getElementById('btn').parentNode.pa rentNode); </script>
    This enacts a Xara function call to open the pop-up layer that 'btn' is on on page load as if a button was pressed.

    I added in a Link > Pop-up layer call to my renames 'aPopup' layer attaching that to the big shape on the 'aPopup' layer.
    If you keep the original open popup layer button, this is not needed.

    Andre7+1.xar

    If you have a Variant you use the same approach but change 'btn' to 'btn-V' and use the same JS but for 'btn-V' in addition to the current arrangement.

    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

  8. #8
    Join Date
    Feb 2023
    Location
    England
    Posts
    118

    Default Re: Pop up close

    Thank you very much Acorn. That's exactly what i was looking for.
    As always you came to the rescue. Thanks again!

  9. #9
    Join Date
    Feb 2023
    Location
    England
    Posts
    118

    Default Re: Pop up close

    Quote Originally Posted by Acorn View Post
    I have embellished Chris's file.

    If you have a Variant you use the same approach but change 'btn' to 'btn-V' and use the same JS but for 'btn-V' in addition to the current arrangement.

    Acorn
    The approach works perfectly fine. But i don't seem to be able to get my head around, how to apply it on a variant.
    Because the code applied on page HTML body, if i change the name to " btn-V " the name change on the main variant too.
    I am sure is something simple and i appreciate if you can walk me through. Thanks for your time and your patience.

  10. #10
    Join Date
    Dec 2018
    Location
    Australia
    Posts
    1,821

    Default Re: Pop up close

    Right click on the button and Website Variants > Stop Sharing With Variants.
    You should then be able to rename one without affecting the other.

 

 

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
  •