Detemining Client Browser Being Used

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
marcv
New User
Posts: 1
Joined: Fri Feb 18, 2011 2:05 pm
First Name: Marc
Last Name: Vadeboncoeur
Company Name: Astro-Med, Inc.
Phone: 401-828-4000 x520
Address 1: 600 East Greenwich Avenue
City: West Warwick
State / Province: Rhode Island
Zip / Postal Code: 02893
Country: United States
Contact:

Detemining Client Browser Being Used

Post by marcv »

Hi Folks,

We have 3.0.8 of PUI installed and I am completing a fairly complex proof-of-concept application for management signoff on product acquisition. My application has mutiple chart widgets in use and they of course will not render on an iPad/Mac because of Apple's lack of support for Flash.

I would like to put in some RPG logic to display other screen objects in place of the charts if the client web browser is being used on an iPad or Mac (i.e. if Safari is being used). Is there any kind of environment variable within PUI that I can make known to my RPG app via a variable that will tell my app that Safari is being used so I can display the Safari-specific screen objects in place of the charts?

Thanks,

Marc Vadeboncoeur
Astro-Med, Inc.
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Detemining Client Browser Being Used

Post by Brian »

So, my first question is will this be running as a pure PUI application or will it be called from a Genie session?

If not called from a Genie session, there is an environment variable on the job, HTTP_USER_AGENT. There is a lot of info in here, so this article (http://www.quirksmode.org/js/detect.html) can help you interpret it.

If the program will be called from within Genie, it is possible but much more involved as we do not have the ability to create a simple environment variable. If you need instructions for running under Genie, let me know.


Also, I don't think you want to monitor for Safari. I don't have a Mac in front of me, but I'm pretty sure it supports flash on Mac and PC. It's the iPhone/iPad that has the issue. So you may want to monitor for the OS instead. It is in there as well.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests