Home Forums Community Forum Global Element Button does not open in a new tab if “_new” option chosen

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • driven13
    Participant
    Post count: 3

    Hello all.

    I have created a Button and made it into a Global Element so that it shows up on all the pages. It is working fine but, even if I choose the option to open up the link in a new tab (_new), it opens up the link in the same tab.

    I have tried removing and then adding it both from the Avada Library page as well as from one of the individual pages where this button sits. But the result is the same: it opens in the same tab.

    Any ideas…?? Is this a bug the developers would need to address and fix or am I missing something here…??

    Thanks in advance.

    –A.

    marklchaves
    Participant
    Post count: 873

    Hi @driven13,

    target="_new" isn’t valid syntax for a (anchor) tags.

    Try target="_blank" in your a tag instead.

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target

    Cheers!

    driven13
    Participant
    Post count: 3

    Hello @marklchaves.

    I had misspoken. It was indeed _blank and not _new.

    Also, this is one of the pre-built options that all I have to do is choose when I am setting up a button. It is not something that I am adding to existing HTML code snippet.

    So when I choose _blank from Avada’s options for setting up a button that is a Global Element, the link opens in the same tab.

    Thanks.

    driven13
    Participant
    Post count: 3

    Sorry to bump this but does anyone have any idea why this is happening and how I can fix it…??

    I cannot figure it out as it is part of the core Avada files.

    marklchaves
    Participant
    Post count: 873

    Hey there,

    It most likely not a bug, because I can’t reproduce the issue on my sites, and this thread would be pretty popular if it was a bug.

    If you haven’t yet, try:

    1) Checking your browser’s console when you click on the global button to see if there are any JavaScript errors.

    2) Inspecting your button’s link to verify it has the target="_blank" attribute.

    3) If your button has the correct attribute, inspect to see if there’s an event listener attached to the button that might be overriding or ignoring your attribute setting.

    4) Lastly, make sure it’s not a plugin conflict causing the issue.

    Cheers!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.