Question

I had reached some issues:

<script language="javascript">
function MyFunc()
{
    var str = document.getElementById("TextArea1").value;
    alert(str);
}
function CreateFile()
{
    //var path = document.location.substring(8, (path.length - 4)) + ".txt";
    var path = "z:\\file.txt";
    alert(path);
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    alert("Set FSO.");
    var s = fso.CreateTextFile(path, true);
    alert("Created.");
    var str = document.getElementById("Select1").value;
    s.write(str);
    alert("Written.");
    s.close();
}
</script>

Looks like I am not reaching even 2nd alert. Do you know, what I am missing?

No correct solution

OTHER TIPS

Yes, I know. You have created two functions but you have not called them yet. Also, in your script tag the language should be "text/javascript".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top