Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detecting AOL browser

Status
Not open for further replies.

inusrat

Programmer
Feb 28, 2004
308
CA
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
 
[red]navigator.appName[/red] returns "Microsoft Internet Explorer" because it uses the IE core for it's browser. Although sometimes unreliable, you could check the [red]navigator.appVersion[/red] variable for "AOL".
Code:
if (navigator.appVersion.indexOf("AOL") != -1) {
   alert("You're using an AOL browser.");
}
 
Thanks for your message
Do you know how can I get screen inner width?

screen.availWidth works.

But even screen.availWidth does not give me the inner size of the screen after subtracting space taken by the browser.
I tested on AOL min (AOL puts its on menu on the left) and Max window. On both I got size 1024

Thanks
 
it would be screen width - scrollbar width do you mean? If so, maybe use the clientWidth property:
Code:
alert(document.body.clientWidth);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top