K
Key Bohn
var NN4 = document.layers? true : false; //Netscape Navigator 4.x.
var IE4 = document.all? true : false; // IE version 4 and above.
var agent = navigator.userAgent.toLowerCase();
function display(flash) {
if (IE4) {
document.all[flash].style.visibility = "visible";
}
if (agent.indexOf("mac") != -1)
{
document.layers[flash].visibility = "hide";
}
else if(NN4) {
document.layers[flash].visibility = "hide";
}
}
This is being used to detect a user's browser and platform and show or hide
a layer containing a small flash movie depending. It's supposed to show in
IE for PC (which works) hide in Netscape for PC (also works) and hide for
IE MAcintosh. That last one does not work and it shows the layer. Can
anyone tell me why?
var IE4 = document.all? true : false; // IE version 4 and above.
var agent = navigator.userAgent.toLowerCase();
function display(flash) {
if (IE4) {
document.all[flash].style.visibility = "visible";
}
if (agent.indexOf("mac") != -1)
{
document.layers[flash].visibility = "hide";
}
else if(NN4) {
document.layers[flash].visibility = "hide";
}
}
This is being used to detect a user's browser and platform and show or hide
a layer containing a small flash movie depending. It's supposed to show in
IE for PC (which works) hide in Netscape for PC (also works) and hide for
IE MAcintosh. That last one does not work and it shows the layer. Can
anyone tell me why?