Guys I get the below code to work in IE, but not in FF. Any ideas getting it to work in FF?
Code:
<html>
<head>
cmCreatePageviewTag("<<label id="myDiv1"></label>>","<<label id="myDiv2"></label>>");
<script language="javascript">
<!-- works in IE only -->
function WriteToFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Text.txt", true);
document.getElementById("myDiv1").innerHTML = window.location.pathname;
document.getElementById("myDiv2").innerHTML = top.location.pathname.replace(/\\/g,"/").replace( /\/[^\/]*$/, "/" );
s.WriteLine('<script language=\"javascript\"\>');
s.WriteLine("cmCreatePageviewTag(\"<" + window.location.pathname + "," + top.location.pathname.replace(/\\/g,"/").replace( /\/[^\/]*$/, "/" ) + ">\")");
s.WriteLine('\</script\>');
s.Close();
}
</script>
</head>
<body onLoad="WriteToFile()">
</body>
</html>