Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 1st, 2004, 02:16 PM
Authorized User
 
Join Date: Feb 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default Detecting AOL browser

Hi,

I want to detect if user is using AOL browser Following tell me about IE and Netscape but not about AOL.

***********************
if(navigator.appName == "Netscape")
{
 alert("You're using a Netscape browser.")
}
 else if(navigator.appName == "Microsoft Internet Explorer")
{
 alert("You're using the Internet Explorer browser.")
}

*****************

Thanks

 
Old June 1st, 2004, 05:05 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Run this code on an AOL browser:

alert(navigator.appName);

This will tell you what to look for.

HTH,

Snib

<><
 
Old June 1st, 2004, 05:08 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I don't really see *why* you'd want to detect an AOL browser, all it is is MSIE in an AOL wrapper.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 1st, 2004, 05:21 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Oh ya, I think I've tried it before, and it just says MSIE (compatible blah blah).

Snib

<><
 
Old June 1st, 2004, 11:43 PM
Authorized User
 
Join Date: Feb 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

navigator.appName does not work on AOL. I tried the following if statement and no message popped up.

*************

if(navigator.appName == "Netscape")
{
 alert("You're using a Netscape browser.")
}
 else if(navigator.appName == "Microsoft Internet Explorer")
{
 alert("You're using the Internet Explorer browser.")
}

else

alert("You're using AOL.")

******************



 
Old June 2nd, 2004, 12:52 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

It seems my advice is falling on deaf ears.
AOL uses MSIE! AOL doesn't have a special browser!

<script type='text/javascript'>
    alert(navigator.appName);
</script>

Outputs "Microsoft Internet Explorer" when ran in an "AOL" browser.

Secondly, you do not need to detect the AOL browser anyway, if you'd bother reading my reply in your other thread! Don't bother asking questions if you aren't going to bother to read the answers.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old June 4th, 2004, 11:36 AM
Authorized User
 
Join Date: Feb 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Richard with all due respect when someone ask a question mostly there is a reason for that based on their program logic.

Anyway one can find out whether client side is using actual AOL browswer or not with the following.

if (navigator.appVersion.indexOf("AOL") != -1) {
  AOL = "Yes"; }






Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding AOL Explorer Browser anujrathi ASP.NET 1.0 and 1.1 Professional 0 June 7th, 2006 07:06 AM
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM
Detecting Pocket PC device on Browser johnnycorpse Classic ASP Basics 2 May 25th, 2005 07:57 AM
Detecting Read-Only rgerald Access VBA 6 October 30th, 2003 04:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.