1 Attachment(s)
Re: Anchor links close popup layer problem
Quote:
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:
Quote:
popup: close open "menu"
Is it possible to use:
Quote:
popup: close "about" open "services"
I couldn't get this to work?
Attached my demo xar.
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?
1 Attachment(s)
Re: Anchor links close popup layer problem
hello again Siran,
Quote:
... 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:
Quote:
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:
Quote:
popup: close open "menu"
is far easier to use without needing multiple close strings. But I now know it's possible so thanks again
Quote:
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 ;)
Re: Anchor links close popup layer problem
Now I see the problem, the layer name has to be given including the keywords... :confused:
2 Attachment(s)
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
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...
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?
Re: Anchor links close popup layer problem
Quote:
Originally Posted by
siran
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.
Quote:
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.
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.,
Quote:
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:
menu(lock) links for buttons:
Quote:
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.