Use specific link in open_link_as_overlay();
Posted
#4552
(In Topic #964)

Standard member

Code
<a onclick="return open_link_as_overlay(this);" rel="nofollow" href="{FULL_LOGIN_URL*}" title="{!MORE}: {!_LOGIN}">{$?,{$MOBILE},{!_LOGIN},{!OPTIONS}}</a>
I've replaced that with a button tag, but I can't seem to implement the overlay functionality when using a button in place of the default anchor tag. You can't add the href attribute to a button tag, you can't nest the button tag under an anchor tag (and remain standards compliant). The only logical solution I could think of is nesting the button within a form and placing {FULL_LOGIN_URL*} within the forms action attribute, then use onclick="return open_link_as_overlay(this);" on the button. But, all this did when I tried it was reload the main page and completely ignored open_link_as_overlay(this);.
Is there a way to define a specific link within open_link_as_overlay();? Using onclick="return open_link_as_overlay('https://mylink.com');" didn't seem to work either.
Posted

Site director

onclick="faux_open(some_url);"
Documentation you might read about JavaScript's 'standard' window.open method is mostly applicable to faux_open, which is designed to emulate it for our overlays (instead of new windows).
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted

Standard member


When I use faux_open(https://google.com);, I get this error:
1: SyntaxError: missing ) after argument list
If I add single quotes, like: faux_open('https://google.com');, I get this error:
120: TypeError: this.width is null
Posted

Standard member

onclick="faux_open('{$PAGE_LINK,:login:wide_high=1}','','width=500,height=500,status=yes,resizable=yes,scrollbars=yes');"
Posted

Site director

Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.