Hi
I have this code:
function Is ()
{ var agt=navigator.userAgent.toLowerCase();
//alert (agt);
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1)));
this.nav2 = (this.nav && (this.major == 2));
this.nav3 = (this.nav && (this.major == 3));
this.nav4 = (this.nav && (this.major == 4));
this.nav5 = (this.nav && (this.major == 5));
this.vms = (agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1);
}
function toggleT(_w,_h) {
var is = new Is();
if (is.nav) { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
else { // is IE
//alert ("a");
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
}
}
works good on ie, but not on netscape 7.0
any idea?
Assaf
I have this code:
function Is ()
{ var agt=navigator.userAgent.toLowerCase();
//alert (agt);
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1)));
this.nav2 = (this.nav && (this.major == 2));
this.nav3 = (this.nav && (this.major == 3));
this.nav4 = (this.nav && (this.major == 4));
this.nav5 = (this.nav && (this.major == 5));
this.vms = (agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1);
}
function toggleT(_w,_h) {
var is = new Is();
if (is.nav) { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
else { // is IE
//alert ("a");
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
}
}
works good on ie, but not on netscape 7.0
any idea?
Assaf