I would like to append a .txt file ussing HTML or java I know this is possible but keep on running into the ActiveX warning, which in this case is just annoying (we know ActiveX stop being so darn dogmatic)
is there just a simple way of scripting this without AxtiveX prompts?
The current script as follows (or at lest snippit of)
<title>fruit.txt </title>
<SCRIPT LANGUAGE='JavaScript'>
function WriteToFile() {
try {
var fso, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.OpenTextFile("C:\\TESTAPEND\\TESTAPEND.txt" , 8, 1, -2);
s.writeline(document.ietmdata.name.value);
s.Close();
}
catch(err){
var strErr = 'Error:';
strErr += '\nNumber:' + err.number;
strErr += '\nDescription:' + err.description;
document.write(strErr);
}
}
function WriteToFile2() {
try {
var fso2, s2;
fso2 = new ActiveXObject("Scripting.FileSystemObject");
s2 = fso2.OpenTextFile("C:\\TESTAPEND\\TESTAPEND.txt" , 8, 1, -2);
s2.writeline(document.ietmdata2.name2.value);
s2.Close();
}
catch(err2){
var strErr2 = 'Error:';
strErr2 += '\nNumber:' + err2.number;
strErr2 += '\nDescription:' + err.description;
document.write(strErr2);
}
}
function WriteToFile3() {
try {
var fso3, s3;
fso3 = new ActiveXObject("Scripting.FileSystemObject");
s3 = fso3.OpenTextFile("C:\\TESTAPEND\\TESTAPEND.txt" , 8, 1, -2);
s3.writeline(document.ietmdata2.name2.value);
s3.Close();
}
catch(err2){
var strErr3 = 'Error:';
strErr3 += '\nNumber:' + err3.number;
strErr3 += '\nDescription:' + err.description;
document.write(strErr3);
}
}
</SCRIPT>
</head>
<body>
<p class=rvps3><span class=rvts13>Append acaddoc.lsp</span></p>
<p class=rvps2><img border=0 width=80 height=129 alt="" hspace=1 vspace=1 src="VTS_LOGO.jpg"></p>
<hr noshade size=1 style="color : #000000">
<p><span class=rvts10>Drawing Analyser 1.1</span></p>
<hr noshade size=1 style="color : #000000">
<p><br></p>
<p>
<center>If your Acaddoc.lsp file resides where AutoCAD installed them by default, simply click append next to the version of AutoCAD you want to apply the Drawing Analyser 1.1 program to. <br> <br> <br> <br> <table border="1"><tr><th>
<form action="test.hta" method="post" name="ietmdata">
AutoCAD 2006 <INPUT TYPE=BUTTON VALUE="APPEND" onClick="WriteToFile(this.form); window.location.href='Append_acaddoc_LSP_MODULE_2.html'"></table border="1"></tr></th><div id="myarea" style="visibility:hidden"> <textarea name="name" cols="40" rows="1">
Appels
</textarea> </div>
</form>
<table border="1"><tr><th>
<form action="test.hta" method="post" name="ietmdata2">
AutoCAD 2009 <INPUT TYPE=BUTTON VALUE="APPEND" onClick="WriteToFile2(this.form); window.location.href='Append_acaddoc_LSP_MODULE_2.html'"></table border="1"></tr></th><div id="myarea2" style="visibility:hidden"> <textarea name="name2" cols="40" rows="1">
Pears
</textarea> </div>
</form>
<table border="1"><tr><th>
<form action="test.hta" method="post" name="ietmdata3">
AutoCAD 2010 <INPUT TYPE=BUTTON VALUE="APPEND" onClick="WriteToFile3(this.form); window.location.href='Append_acaddoc_LSP_MODULE_2.html'"></table border="1"></tr></th><div id="myarea3" style="visibility:hidden"> <textarea name="name3" cols="40" rows="1">
Bannanas
</textarea> </div>
</center></form>