My object: Take latitude, longitude columns from textfile(.txt) and mark them on googlemap api v3.
For the first step, I made a code for reading textfile by javascript and html. When I run this code, chrome and IE browser open well but nothing happened. javascript part don't work. How can I fix it?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
var fso=new ActiveXObject("Scripting.FileSystemObject");
var filename="C:\\text.txt";
function savefile() {
if (!fso.FileExists(filename)) {
fso.CreateTextFile(filename,true);
}
var
f=fso.OpenTextFile(filename,2,true);
f.Write(myarea.innerHTML);
f.Close();
}
function loadfile() {
if (!fso.FileExists(filename)) {
fso.CreateTextFile(filename,true);
}
var f=fso.OpenTextFile(filename,1);
r=f.ReadAll();
f.Close();
myarea.innerHTML=r;
}
function window.onload() {
loadfile(filename);
}
</script>
<div id=myarea contenteditable=true
style="width:320;height:240;border:solid 2
inset;overflow:scroll;background-color:silver;"></div>
<br><input
type=button value=load onclick=loadfile()><input type=button value=save
onclick=savefile()>
</body>
</html>
text.txt => (delimiter = " ")
year class sex a b c d
1 1 f 90 80 60 100
1 1 m 90 80 60 100
1 2 f 90 70 60 100
2 1 f 100 80 60 100
3 1 m 90 99 60 100