Discussions

 View Only
  • 1.  Defaulting report link to open a new window instead of just a new tab

    Posted 01-14-2020 12:43
    I have the setting selected on the field settings of a report link in question, however it just opens a new tab in the same browser versus a new browser window over top of the origin browser. Is there a way within QuickBase to make this happen or is that more of a browser settings thing?

    ------------------------------
    Chris Swirtz
    ------------------------------


  • 2.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 14:13
    Edited by Justin Lapier 01-15-2020 14:12

    Chris,

    1. There is no native functionality I am aware of for this.

    2. Modern browsers actually control this mostly, this cannot be done via html with target="_blank", which only opens a new tab/window. I do know custom javascript could be written and injected to open a brand new browser session/window.



    ------------------------------
    Justin Lapier
    Synctivate Inc.
    Synctivate Website
    ------------------------------



  • 3.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 15:06
    Thanks Justin, that is kind of what I figured. Do you happen to know what that Java script might looking like to make this work? I have not yet learned that craft.​

    ------------------------------
    Chris Swirtz
    ------------------------------



  • 4.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 15:43
    Quick GoogleFoo here... if you add features/parameters to a window.open() JavaScript call, it forces it to open as a new window:

    var strWindowFeatures = "height=0,width=0,scrollbars=yes,status=yes";
    var URL = "https://www.google.com";
    var win = window.open(URL, "_blank", strWindowFeatures);

    You can find more information regarding WindowFeatures here: https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features

    ------------------------------
    Ryan Stanford
    ------------------------------



  • 5.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 16:34
    Thanks Ryan! I am getting and error message originating on the 3rd line between the words window and open?

    ------------------------------
    Chris Swirtz
    ------------------------------



  • 6.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 16:39
    Where are you trying to inject the javascript itself? a formula field or a code page?

    ------------------------------
    Ryan Stanford
    ------------------------------



  • 7.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-15-2020 16:43
    ​A formula field, which now I am guessing is wrong.

    ------------------------------
    Chris Swirtz
    ------------------------------



  • 8.  RE: Defaulting report link to open a new window instead of just a new tab

    Posted 01-16-2020 14:55
    Edited by Ryan Stanford 01-16-2020 15:04
    There's two ways to have it work... you can either create a rich text field which will have the JavaScript as part of the formula (I'm not as experienced in this, due to having to transpose the JS to work with QB's Formula nuances) or using the rich text field to just make a button, and use Image-on-Load Technique to have the JavaScript (code page) injected as a click event when that rich text field is clicked.

    the IOL with a code page is what I normally use, as the code page will be pure JS (no transposing needed).

    ------------------------------
    Ryan Stanford
    ------------------------------