Close Current Tab

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
AjFromADS
New User
Posts: 11
Joined: Wed Sep 03, 2014 4:20 pm
First Name: Aj
Last Name: Flint
Company Name: Advanced Data Systems
Contact:

Close Current Tab

Post by AjFromADS »

Is there a way to close the current tab by clicking a button, without having the "Your session has ended." message show up?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Close Current Tab

Post by Scott Klement »

Is this an Atrium tab? When I try to close an Atrium tab (by ending the program), I do not get the 'your session has ended' box, it seems to just close the tab.

Or, what type of tab do you mean?
AjFromADS
New User
Posts: 11
Joined: Wed Sep 03, 2014 4:20 pm
First Name: Aj
Last Name: Flint
Company Name: Advanced Data Systems
Contact:

Re: Close Current Tab

Post by AjFromADS »

I believe it is an Atrium tab. We call the program using a URL. I want to be able to press a button the will close the browser tab that the program is running in.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Close Current Tab

Post by Scott Klement »

It's not clear to me if you're using an Atrium tab or a browser tab, you mentioned both in your last reply. You said you think you're using Atrium... if so, when you set up the menu item (in Atrium's control panel, on the Navigation pane) then you should have properties like this:
atriumtab.png
atriumtab.png (9.75 KiB) Viewed 669 times
The "Open as" property will determine whether you open the application as a "tab in the portal" (aka Atrium tab) or a new browser window/tab. So if you're using Atrium, then looking at these properties should tell you what sort of tab it is.

You also mention that you're running the application via a URL. Obviously (as you can see in the above screenshot) this is possible in Atrium, but it's also possible to launch a URL in a variety of other ways, such as JavaScript, or buttons/links, or even something like STRPCCMD from green-screens. In those cases, you are surely getting a browser tab because Atrium isn't being used.

So... hopefully with that info, you can determine if this is an Atrium tab or browser tab.

If this is an Atrium tab... then you are likely either launching the item as a "Rich Display", "Web Application" or "Genie Macro". For Rich Display or Web Application the tab should automaticalyl close when the program ends. If that isn't working, please contact our support department. If this is a Genie Macro, then you should have an instruction that says "Close the browser window or tab" when a particular screen is reached, and this should close things properly.

If this is a browser tab, then there are variables that can be used to control what happens when the session is closed:
http://www.profoundlogic.com/docs/displ ... n+on+Close

There's also a pui.closeSession() API as well:
http://www.profoundlogic.com/docs/displ ... sion%28%29

Also note that sometimes a browser won't let you close a tab programmatically. (I think this is a security thing.) This is a feature of the browser that we do not have control over, so when that happens, PUI will display a message asking the user to close the tab...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests