Here is my Javascript code:
function initMap() {
// Define the LatLng coordinates for the polygon.
var RoundList = [
{lat: 25.774, lng: -80.190},
{lat: 18.466, lng: -66.118},
{lat: 18.400, lng: -65.118},
{lat: 19.551, lng: -60.164},
{lat: 32.321, lng: -64.757}
];
What I'm going to do is load a local text file to change 【var RoundList】.
I've done the following Output methods:
function WriteToFile(text) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f="c:\\test.txt";
var s = fso.CreateTextFile(f, true);
s.WriteLine('<?xml version=”1.0″ encoding=”utf-8″ ?>');
s.WriteLine(text);
s.Close();
}
It's useless in the latest version of IE or Chrome.
Chrome Gives an Error:
(X)Uncaught ReferenceError: ActiveXObject is not defined.
IE does nothing!
Does anybody know how to implement Input and Output text file? Please help me to figure it out, I'm appreciate!