I have a Javascript file (.js) and when I try to run it by double clicking it I get an error that 'navigator' is undefined. Error Code is 800A1391. The initial lines of code for the file is:
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf("konqueror")!=-1) agent = "konqueror";
else if (agent.indexOf("safari")!=-1) agent = "safari";
else if (agent.indexOf("opera")!=-1) agent = "opera";
else if (agent.indexOf("firefox")!=-1) agent = "firefox";
else if (agent.indexOf("msie")!=-1) agent = "msie";
window.onerror=handleErr;
How to I run it or debug this?
var agent = navigator.userAgent.toLowerCase();
if (agent.indexOf("konqueror")!=-1) agent = "konqueror";
else if (agent.indexOf("safari")!=-1) agent = "safari";
else if (agent.indexOf("opera")!=-1) agent = "opera";
else if (agent.indexOf("firefox")!=-1) agent = "firefox";
else if (agent.indexOf("msie")!=-1) agent = "msie";
window.onerror=handleErr;
How to I run it or debug this?