DJAJ
03-08-2006, 12:11 PM
Hi,
Iīm trying to load a HTML-Document to read the <p>-Tag (for PDF-Export).
The link to the index.html is embded in a xml-element. Donīt know how to execute the link to get the HTML-file but on the first step I try to read the content of the html-file.
With the following code, I get the content as a stream:
function Textstream() {
var fso, f, ts;
var ForReading = 1;
var TristateUseDefault = -2;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile("c:\\index.html");
ts = f.OpenAsTextStream(ForReading, TristateUseDefault);
s = ts.ReadAll( );
alert(s);
}
But i would like to load the index.html into a DHTML DOM an read the Tags with:
document.all.tags("p");
Thanx !
Iīm trying to load a HTML-Document to read the <p>-Tag (for PDF-Export).
The link to the index.html is embded in a xml-element. Donīt know how to execute the link to get the HTML-file but on the first step I try to read the content of the html-file.
With the following code, I get the content as a stream:
function Textstream() {
var fso, f, ts;
var ForReading = 1;
var TristateUseDefault = -2;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile("c:\\index.html");
ts = f.OpenAsTextStream(ForReading, TristateUseDefault);
s = ts.ReadAll( );
alert(s);
}
But i would like to load the index.html into a DHTML DOM an read the Tags with:
document.all.tags("p");
Thanx !