Hi again
I have been using a script to open a .txt or .html file from a location. (hit browse and choose the file) it than opend the file in a text area below, u can than proceed to edit and finally save.
This has worked fine from my USB stick, and even from my local drive, how ever (since this is at work) we have recently started using 2 drives that are mapped to external servers, and we have to store everything on these rather than our local drives, now when I try to open the files I get an error message.
error:
Error: Automation Server Can’t Create object
Code: 0
here is the shelled out code I was using:
[CODE]
<html>
<head>
<script type=”text/javascript”>
function ShowFile(sFilePath){
var oFileSystem = new ActiveXObject(“Scripting.FileSystemObject”);
frmEditHTML.tarHTMLText.value = oFileSystem.OpenTextFile(sFilePath.value).ReadAll();
}
function SaveAfterEditing(sFilePath){
var oFileSystem = new ActiveXObject(“Scripting.FileSystemObject”);
var oFile = oFileSystem.CreateTextFile(frmEditHTML.filPath.value,1);
oFile.WriteLine(sFilePath.value);
oFile.Close();
}
</script>
</head>
<body>
<form name=”frmEditHTML”>
<br>
<input class=”button2″ type=file name=”filPath” onchange=”ShowFile(this)” size=”111″>
<input class=”button” type=”reset” value=”Reset” name=”Button3″ style=”border: 0;”>
<input class=”button” type=”button” value=”Save” name=”cmdSave” onclick=”SaveAfterEditing(this.form[‘tarHTMLText’])”>
<br>
<textarea name=”tarHTMLText” cols=”123″ rows=”16″ style=”border:2px solid #000000; font-family: Comic Sans MS; font-size: 14; font-weight: bold; background-image: url(notepad.jpg); background-attachment: fixed;”>
Use ‘Browse’ to select your file (.txt | .html | .htm | etc.), manually choosing the DIR may cause it to play up.
</textarea>
</form>
</div>
</body>
</html>
I think thats all of it. Any Ideas?
Thank You
Kirt