• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] How to tell if app is running in portal tab or popup window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] How to tell if app is running in portal tab or popup window

    Hi,

    I would like to know the way to determine within the app itself if the app had been opened in the portal tab or if it had been launched in a pop-up window.

    Thanks for your help!

  • #2
    When you say within the app itself I assume you mean the front-end JavaScript part. If so you can simply check to see if window.opener exists. If that returns true then the app is running in a window and you can assume it's in a tab if not.

    Code:
    if (window.opener) {
        alert('this app is running in a window');
    } else {
        alert('this app is running in a tab');
    }

    Comment

    Working...
    X