Welcome to TalkGraphics.com
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,746

    Default Re: Close Pop up Layer and Return to Top

    Quote Originally Posted by gwpriester View Post
    Yes, and that would be swell if that is actually what it did. It did ascend to the top of the page but it did not close the layer. Download the test file from HERE and see for yourself.
    Gary, I couldn't find the popup as there were serveral dead links as this page was an extract.

    Anyhow, you did not read my instructions.

    When I set up your pop-up to have to use the Close icon, in the browser the close icon code is javascript:xr_ppc("xr_xp5");.
    Your "CLICK TO CLOSE" link therefore needs to be javascript:xr_ppc("xr_xp5"); xr_top(); . My javascript:xr_ppc("xr_xp4"); xr_top(); was for my file.

    When done, it works beautifully.

    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

  2. #12
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,487

    Default Re: Close Pop up Layer and Return to Top

    Stunning. It does work beautifully. Many thanks again.

  3. #13
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Close Pop up Layer and Return to Top

    Nice solution Acorn.
    Attached is a variant with a script at the page head to automate the layer closing, so that you don't need to enter the code to the link yourself.
    It uses the global document.onmousedown event, so if you need to use that somewhere else in your document you would need merge those codes or use event listeners instead.
    Attached Files Attached Files

  4. #14
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,487

    Default Re: Close Pop up Layer and Return to Top

    Thanks Siran. I would like to see Xara developers add this capability to the layer menu.

  5. #15
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Close Pop up Layer and Return to Top

    The above example didn't work with stickie buttons, this one does.
    Attached Files Attached Files

  6. #16
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,487

    Default Re: Close Pop up Layer and Return to Top

    Cool. Thanks Siran.

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

    Default Re: Close Pop up Layer and Return to Top

    I have also checked Sticky Buttons and my approach works for these too: Sticky & Stick at Top & Stick at Edge. And with Variants.

    Acorn
    Last edited by Acorn; 29 September 2019 at 04:48 PM.
    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. #18
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Close Pop up Layer and Return to Top

    Acorn, I'm quite sure the manual method you provided is more robust. It is quite unlikely Xara changes the names of internal procedures so your method should work for future versions as well, while the script approach relies on the structure of the HTML Xara creates, which might very well change in the future.
    So anyone willing to change the code in the link address is strongly encouraged to use your method.

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

    Cool Re: Close Pop up Layer and Return to Top

    Quote Originally Posted by siran View Post
    Acorn, I'm quite sure the manual method you provided is more robust. It is quite unlikely Xara changes the names of internal procedures so your method should work for future versions as well, while the script approach relies on the structure of the HTML Xara creates, which might very well change in the future.
    So anyone willing to change the code in the link address is strongly encouraged to use your method.
    siran, thank you for the endorsement; I was using my approach as a counterpoint to yours simply because it was simpler to visualise. I applaud your deeper understanding of the mechanics. I can understand your coding but rarely can I create it from a concept.

    My approach fails when buttons and pop-ups are removed so as ever testing is paramount.

    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
  •