RE: [flexcoders] how can I know what browser my app is in?

2007-03-19 Thread Tracy Spratt
Are you using ExternalInterface to talk to javascript in the html
wrapper?  I haven't worked with browsers enough recently to remember
what javascript knows about the host browser.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Collins
Sent: Monday, March 19, 2007 5:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how can I know what browser my app is in?

 

I have looked up userAgent, user-agent, browser, browser type, etc. and
can not find anything that will allow me to tell what browser is hosting
my app.

 

Can anyone tell me if and where something like this may be?

 

Thanks,

Mike

 



RE: [flexcoders] how can I know what browser my app is in?

2007-03-19 Thread Alex Harui
This is being used in some cases:

 

/* Autodetect browser type; sets browser var to 'IE', 'Safari',
'Firefox' or empty string. */

function getBrowser()

{

var name = navigator.appName;

var agent = navigator.userAgent.toLowerCase();

 

if (name.indexOf('Microsoft') != -1)

{

if (agent.indexOf('mac') == -1)

{

browser = 'IE';

// note that Mac IE is considered to be uncategorized

}

}

else if (agent.indexOf('safari') != -1)

{

browser = 'Safari';

}

else if (agent.indexOf('firefox') != -1)

{

browser = 'Firefox';

}

}

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Monday, March 19, 2007 4:38 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] how can I know what browser my app is in?

 

Are you using ExternalInterface to talk to javascript in the html
wrapper?  I haven't worked with browsers enough recently to remember
what javascript knows about the host browser.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Collins
Sent: Monday, March 19, 2007 5:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how can I know what browser my app is in?

 

I have looked up userAgent, user-agent, browser, browser type, etc. and
can not find anything that will allow me to tell what browser is hosting
my app.

 

Can anyone tell me if and where something like this may be?

 

Thanks,

Mike