I have one file i.e style.css/any file whose content need to be shifted to another text file which is file.txt. Using ActiveXObject is not working, so could you please provide any other solution.?
Here is my code which I tried.
jQuery(function ($) {
$.get('css/style.css', function (data) {
// alert(data);
writeToFile(data);
});
function writeToFile(content) {
// alert(content);
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fh = fso.OpenTextFile("file.txt", 8);
fh.WriteLine(content);
fh.Close();
}
});