Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

UI Button is set to not open a new window but it still does.

Howard Nedd January 21, 2020

Hello, Within confluence I created a page with an UI button which goes to an internal link on confluence. Now you have the chance to select: Open The Link In a New Window. I purposely have not selected that so I would expect it to not open in a new window but it still does. Am I doing something wrong?Confluence UI Button.PNG

3 answers

0 votes
Ashwin Somani December 13, 2023

Use this script - 

## @Param ID:title=ID|type=string|required=false
## @Param Title:title=Title|type=string|required=true
## @Param URL:title=URL|type=string|required=true
## @Param CSS:title=CSS|type=string|required=false
## @Param Target:title=Open in the same window|type=boolean|required=false|default=true
#if ($paramTarget == true)
<button id="$paramID" class="btn btn-success" onclick=" window.open('$paramURL','_self')" style="$paramCSS">
        $paramTitle
    </button>
#else 
     <button id="$paramID" class="btn btn-success" onclick=" window.open('$paramURL','_blank')" style="$paramCSS">
        $paramTitle
    </button>
#end
0 votes
YG March 25, 2022

This simple checkbox isn't even an option on Confluence Cloud?

 

Capture-152.PNG

0 votes
Andrew Martinez-Fonts February 3, 2021

I'm having the same issue in reverse... I have "New window" checked, but the link doesn't open in a new window. I also tried reversing it, hoping it might just be reversed, but that also didn't work. Is this a bug?

David Heide March 16, 2021

Me too.

Ashwin Somani September 7, 2023

Hi,
Same here. Can someone provide an update or is there any already existing ticket we do have?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events