Close Current Tab
-
- 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
Is there a way to close the current tab by clicking a button, without having the "Your session has ended." message show up?
-
- 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
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?
Or, what type of tab do you mean?
-
- 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
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.
-
- 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
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:
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...
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...
Who is online
Users browsing this forum: No registered users and 1 guest