how can I read the text in the file from remote machine(from IIS6.0 Virtual directory) either using Javascript or Ajax and copy into client machine 'TEMP/specified' Folder
views:
26answers:
1
+2
A:
<script type="text/javascript">
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
http.open("GET", "test.txt");
http.onreadystatechange=function() {
if(http.readyState == 4) {
alert(http.responseText);
}
}
http.send(null);
</script>
P.S. You cannot actually save file to client's machine
Boris Modylevsky
2009-11-09 11:13:53