Hi
I have put on several pages of my website a javascript tocheck if the visitors use Mac or PC platform.
On some computers (PC, Explorer), this script doesn't work and I cannot figure out why.
Find below the code:
function sniffer(CompanyId){
var isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
if(isMac){
location.href = 'company_mac_index.asp?companyId='+CompanyId;
} else {
location.href = 'company_index.asp?companyId='+CompanyId;
}
return true;
}
Thanks for your help
I have put on several pages of my website a javascript tocheck if the visitors use Mac or PC platform.
On some computers (PC, Explorer), this script doesn't work and I cannot figure out why.
Find below the code:
function sniffer(CompanyId){
var isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
if(isMac){
location.href = 'company_mac_index.asp?companyId='+CompanyId;
} else {
location.href = 'company_index.asp?companyId='+CompanyId;
}
return true;
}
Thanks for your help
Comment