Welcome to TalkGraphics.com
Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  1. #21
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Anchor links close popup layer problem

    A really nice demo Egg.
    Thanks Siran, it's only based on your excellent code.

    Can you kindly remind my fast depleting brain cells what the use of (lock) does on a Layer, I've forgotten?

    My demo uses a menu bar at the top of every page with:

    popup: close open "menu"
    Is it possible to use:

    popup: close "about" open "services"
    I couldn't get this to work?

    Attached my demo xar.
    Attached Files Attached Files
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

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

    Default Re: Anchor links close popup layer problem

    The lock keyword is to have Xara not closing the layer automatically but without adding the default close button as far as I remember without testing.
    Is the question about popup: close "about" open "services" referring to a button in your demo? I couldn't find it. As far as I can tell that should work. At least it did in my simple example.
    On the page it was taken from (https://help.xara.com/article/26-und...d-web-features) the open is skipped and the close is put to the end, so in your case it would be
    popup: "services" close "about"
    Could you try that?

  3. #23
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Anchor links close popup layer problem

    hello again Siran,

    ... the question about popup: close "about" open "services" referring to a button in your demo? I couldn't find it.
    Sorry, no that wasn't on my last demo, I couldn't get it to work, so I didn't include it.

    As you & the link points out, the 'open' isn't required so for example the following works:

    popup: "menu(lock)" close "about(lock)", "services(lock)", "blog(lock)", "contact(lock)"
    I attach a xar file that does use this method and whilst works fine it can be a pia getting it to close the un-required Layers. The use of a menu on each layer with the action:

    popup: close open "menu"
    is far easier to use without needing multiple close strings. But I now know it's possible so thanks again

    The lock keyword is to have Xara not closing the layer automatically but without adding the default close button as far as I remember without testing.
    Yes this indeed does exactly that
    Attached Files Attached Files
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #24
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Anchor links close popup layer problem

    Now I see the problem, the layer name has to be given including the keywords...

  5. #25
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    947

    Default Re: Anchor links close popup layer problem

    Curious to see if an anchor mobile menu could work with the pop-up closing: https://anchor.initiostar.co.uk. Works on my Android OK. Used a hamburger mouseover animation rather than a link to the pop-up layer with a background on the layer to keep the menu in view.

    It scrolls between the anchors on a single page, but it you add additional pages to the menu, I could not get the additional pages to open at the top of page (despite using _top).

    The mobile menu-page & mobile menu/mouseover mobile menu layer approaches work very well, so still trying to understand the application for anchor-driven menus? maybe a supersite with a table of content approach?

    Happy to share the mobile menu models I have used so far (including the new fit to width option).

    Gary
    Attached Files Attached Files

  6. #26
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Anchor links close popup layer problem

    Hi Gary,

    Not had time to look at your attached xar files at present but viewing your site on my iPhone it doesn't close the menu window, it remains open above the page content , I need to click it again to close the menu...
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  7. #27
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    947

    Default Re: Anchor links close popup layer problem

    Hi Egg,

    Thanks for checking; a fluke with Android maybe? I don't know it it is possible to code the action of both linking to an anchor and closing the popup simultaneously. This was as I understand the original issue?

  8. #28
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: Anchor links close popup layer problem

    Quote Originally Posted by siran View Post
    Does this example scroll to as expected?
    It uses Xaras own function to scroll.
    The code has grown a bit to work around strange behavior of IE11.
    I have only tested in latest versions of IE11, Edge, Firefox and FireFox on Android.
    I've only tested on desktop browsers but yes this seems to work really well! Nice work Siran. Looking at the js code it certainly looks like it was complicated so thanks for spending the time on it.

    I don't know it it is possible to code the action of both linking to an anchor and closing the popup simultaneously. This was as I understand the original issue?
    Yup this was original issue, I've yet to try on mobile but Siran's solution in a previous post seems to do this now. Certainly not straight forward as I thought it may have been when I tried to do it initially. That's the thing I find with custom popup menus, they are always fun and interesting to do but they sometimes lead to extra complexity and difficult to solve issues. Still looking over all the demos and exmamples posted, thanks guys.
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  9. #29
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Info Re: Anchor links close popup layer problem

    Perversely, the actions now only work in IE & Edge. My other browsers have upped sticks and left!
    What does work is calling the page without referencing the Anchor and calling it again with, straight away.


    E.g.,
    javascript: void(window.open("two.htm", "_top")); void(window.open("two.htm#aTwo", "_top"));
    My solution is 5 pages with (index, one, two, three, four).htm pages filenames.
    I have 5 buttons (H, 1, 2, 3, 4) on the menu(lock) layer and an H alone aligned on the MouseOff layer.

    MouseOff link to layer for button:
    H:: menu(lock)
    menu(lock) links for buttons:
    H:: index.htm
    1:: javascript: void(window.open("one.htm#aOne", "_top"));
    2:: javascript: void(window.open("two.htm#aTwo", "_top"));
    3:: javascript: void(window.open("three.htm#aThree", "_top"));
    4:: javascript: void(window.open("four.htm#aFour", "_top"));
    An H-click opens the menu. A second returns to the index page with the menu closed. This link could be set to popup:close instead.
    A (1, 2, 3, 4) click opens and scrolls to the set Anchor and closes the menu.
    Re-opening the menu and clicking the link for the same page closes the menu.

    Acorn
    I have major Internet issues so I doubt if I can upload a file.
    P.S. The very slowly uploaded file: Attachment 124483
    P.P.S. sorry i have not been able to examine any of the above solutions either.
    Last edited by Acorn; 08 July 2019 at 03:25 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

 

 

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
  •