Welcome to TalkGraphics.com
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29
  1. #11
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Anchor links close popup layer problem

    This uses some script and a name at the buttons that you want to close pop-up layers.
    If you click one of the buttons at the top two pop-up layers should be opened. All other pop-ups are closed by the script.
    That is not what you are after yet, but is just an oder example from another thread.
    I added the same name to the links on the pop-up layers and if you click these also all pop-ups are clodes and the site scrolls down to the anchors.
    Attached Files Attached Files

  2. #12
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: Anchor links close popup layer problem

    That looks like what I am after Siran but I'm having difficulty getting it to work on my own menu. I've added the JS to the head section and added the class names to the About and Services buttons. The popup closes when clicking the About or Services links which is great but it no longer goes to the section on the page for some reason, if I remove the JS it goes to the section, so not sure why it's not working. I've attached a xar file of my menu maybe you can see what I'm doing wrong.

    menu_test.xar
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  3. #13
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Anchor links close popup layer problem

    Not sure I completely understand your requirement, but if it is to link an anchor to a popup menu, that itself can redirect the viewer to another layer (same page), or another page, then this model does that and closes the popup on the redirect. It is uses Popup and MouseOver Popup layers with a standard SINGLE NavBar over those two layers on EACH page.

    Where you need the anchor to show a specific popup menu, you could create a Page Specific NavBar (that can link to page layers, PDFs or whatever).

    Apologies though if I have misunderstood what you want.

    Gary
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Anchor Link Menu.PNG 
Views:	44 
Size:	72.1 KB 
ID:	124463  
    Attached Files Attached Files

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

    Default Re: Anchor links close popup layer problem

    Somehow the click event seems to be purged by the pop-up close function when the button is stickie.
    Don't really undersand why, but a workaround would be to fire our own click event.
    Another workaround would be to delay the pop-up layer closing until the click has been processed, but the required delay time might depend on the browser or performance of the visitors device.
    Attached Files Attached Files

  5. #15
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: Anchor links close popup layer problem

    Quote Originally Posted by Initiostar View Post
    Not sure I completely understand your requirement, but if it is to link an anchor to a popup menu, that itself can redirect the viewer to another layer (same page), or another page, then this model does that and closes the popup on the redirect. It is uses Popup and MouseOver Popup layers with a standard SINGLE NavBar over those two layers on EACH page.

    Where you need the anchor to show a specific popup menu, you could create a Page Specific NavBar (that can link to page layers, PDFs or whatever).

    Apologies though if I have misunderstood what you want.

    Gary
    Different type of anchor Gary, but thanks for the suggestion.

    Siran, that last file works but there's a bit of jerk when it scrolls to the section, not sure what's causing it and yes nit-picky I know. I'm just wondering if putting in code to scroll to the anchor might work smoother than firing the click event. Maybe it wouldn't but is it possible to test by just harcoding in the #xl_about name ? Don't worry if it's not possible or too complicated, already is a pretty complex solution for something you would think ought to be easy and what you have there now is pretty good. Thanks for the help.
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  6. #16
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: Anchor links close popup layer problem

    Actually just a follow up observation Siran: that works really well and smooth if you keep clicking the same link and moving the page so yeah perfect. But only when you alternate between clicking the different links it causes that bit of jump when scrolling.
    XT-CMS - a self-hosted CMS for Xara Designers - Xara + CMS Demo with blog & ecommerce shopping cart system.

  7. #17
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Anchor links close popup layer problem

    Acorn did a JQuery based "scroll to" some time back, and if I remember correctly I tried to simulate that effect.
    I will have a look if I find some time for it and then check if it can be integrated.

  8. #18
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,910

    Default Re: Anchor links close popup layer problem

    Here's another approach without using anchors based on Sirans original script.

    DEMO
    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

  9. #19
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Anchor links close popup layer problem

    A really nice demo Egg.

  10. #20
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: Anchor links close popup layer problem

    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.
    Attached Files Attached Files

 

 

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
  •