Hello,
I was just searching through the web today and found how you can opne and read files (but have not tried to find write and erase...yet) - here is the script -
<html>
<body>
<script type="text/javascript">
<!--//
//-----------------------------------------------------------------------
// author: Vincent Puglia
// site: http://members.aol.com/grassblad
//-----------------------------------------------------------------------
function loadFile(oSrc, oDest)
{
var fso, oFile, contents
var ForReading = 1
var txtFile = oSrc.value;
fso = new ActiveXObject("Scripting.FileSystemObject")
oFile = fso.OpenTextFile(txtFile, ForReading)
contents = oFile.ReadAll()
oDest.value = contents;
oFile.Close()
}
//-->
</script>
</head>
<body>
<form name="a">
<input type="file" name="b">
<input type="button" value="Load It" onclick='loadFile(this.form.b, this.form.c)'>
<br>
<textarea name="c" cols="80" rows="25"></textarea>
</form>
</body>
</html>
Can anyone give me a tutorial on this or a site ?



,
Reply With Quote
... 


Bookmarks