I know it's possible to check what browser and version is being used when someone enters your site or clicks a link. I've seen code to send messages that the application does or doesn't support a browser. But...
Does anyone know if it's possible (or better yet how) to code a link so that if the person clicking is using Netscape, they are notified that the application works only in Internet Explorer, AND the IE browser is fired automatically to bring up the page?
What this will do is alert non-IE users that the page works only in IE, and IE users will get the page you want them to. There is no way to fire the IE browser from Netscape. If it were, it would be a major security hole. I don't know if the following script helps you, but...
Code:
<html>
<head>
<title>
</title>
<script language=javascript>
function openwin()
{
if (navigator.appName == "Microsoft Internet Explorer")
{
window.location = "popup.htm";
}
else
{
alert ("This page only works in Microsoft Internet Explorer");
}
}
</script>
</head>
<body>
<a href="#" onClick="openwin();">test</a>
</body>
<html>
Wouldn't the smart thing here be to design an app that works in ALL (at least modern) browsers?
To begin with IE only shuts out all Linux users, as well as most Mac users (which will probably be using a Geckobased or Opera browser insted of downloading MS bloatware to their Mac).
Also, what happens if/when AOL switches their 40 million users over to Gecko based browsers instead of IE? (AOL owns Netscape and is no longer bound by a exclusive use IE as engine agreement)?
Relying on (as opposed to using) proprietary code to present content on the net is really not a good thing in the long run.
I see from your profile that you reside in these United States and I understand that this is for a business. Businesses in the US have to comply with the Americans With Disabilities Act and in the US the ADA applies to all electronic media (http://www.usdoj.gov/crt/foia/tal712.txt). Just tell your boss that, unless you all start making your intranet acessible to every browser, you can expect some heafty fines.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Bookmarks