[Javascript] Writing Files to local disk
Rodney Myers
rodney at aflyingstart.net
Thu Jul 3 08:59:26 CDT 2003
With inputs and trigger for output in an upper frame
and the modified file in a lower frame named out
I have a way now to get at the altered output file:
1. Put ID into the starting HTML tag of the file in the "out" frame.
<html id="whole">
Any ID would do, I guess.
2. Alter document using IDs of various table cells
e.g.
function myFunction(form){
parent.out.document.all.someID.innerText=form.someElement.value;
}
3. Get whole document's HTML as string with
var fStr=parent.out.document.all.whole.outerHTML;
// parent because the trigger is in another frame
// out is the name of the output frame
4. Then use FileSystemObject to write fStr to a new file.
R
Rodney Myers wrote:
> Thanks for the reply Peter.
>
> > Have you considered using the FileSystemObject
>
> Yes, I could do that.
>
> > you should be able to use Mappath(relative path/filename)
>
> I am the user btw. and want to run this in file mode. So Mappath will
> not be required.
> Guess FileSystemObject is going to be the way. Pity, but workable.
>
> Rodney
>
>
PS. If you have to answer routine email queries
from your sites or mailings then you will find
the simple-to-use BizAutomator invaluable.
http://www.BizAutomator.co.uk
More information about the Javascript
mailing list