Is there any way to tell if a ProfoundUI program is running within Atrium?
I want to respond to a button click with Atrium.launchURL when the user is running inside of Atrium and pui.openURL when not running Atrium.
Thanks,
Sean
Atrium detection
-
- Profound User
- Posts: 76
- Joined: Fri Jan 11, 2013 6:11 pm
- First Name: Sean
- Last Name: Tyree
- Company Name: US HealthWorks
- State / Province: California
- Zip / Postal Code: 91355
- Country: United States
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Atrium detection
You can determine that with this bit of JavaScript:
The first condition checks to see if you are running in a frame. The 'parent' will be the same as 'window' when not running in a frame, but will be set to the parent page's 'window' when running inside a frame. The 2nd condition checks to see if the parent page has a property called 'Atrium', which then indicates that you are inside Atrium.
Code: Select all
if (parent != window && parent.Atrium) {
// Running inside Atrium.
}
-
- Profound User
- Posts: 76
- Joined: Fri Jan 11, 2013 6:11 pm
- First Name: Sean
- Last Name: Tyree
- Company Name: US HealthWorks
- State / Province: California
- Zip / Postal Code: 91355
- Country: United States
- Contact:
Re: Atrium detection
Thanks David!
Worked like a charm.
Sean
Worked like a charm.
Sean
Who is online
Users browsing this forum: No registered users and 0 guests