steevy
09-30-2002, 07:48 PM
Hi,
I've got an HTA file, in which I have to insert some illustrations in vectorial format CGM.
To this purpose, I use controleActiveX like this (IE):
<P ALIGN=center>
<OBJECT WIDTH="500" HEIGHT="400"
CODETYPE = "image/cgm"
CLASSID="CLSID:F5D98C43-DB16-11CF-8ECA-0000C0FD59C7">
<PARAM NAME="FileName" VALUE="T1-1.cgm">
</OBJECT>
I've got also a script linked to this page loaded via function window.onload() that must scan the current repertory and make some thing (build an XML file with the name of each of them), like this:
function window.onload() {
var fs = new ActiveXObject("Scripting.FileSystemObject");
var folder = fs.getFolder("nomenclature");
var xmlDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
var e, fileObject, fileElement, title, nom, text;
var folderElement = xmlDoc.createElement("repertoire");
xmlDoc.appendChild(folderElement);
e = new Enumerator(folder.files);
for (;!e.atEnd();e.moveNext())
...
Problem: the second lign (var fs= new ActiveXObject("Scripting.fileSystemObject") generates the following error:
Can't Access File Adress
When I don't load the first controle ActiveX, this second ActiveX Object runs well.
So what can I do so that they can't enter in conflict ?
Thanks a lot for your answer,
Steevy.
I've got an HTA file, in which I have to insert some illustrations in vectorial format CGM.
To this purpose, I use controleActiveX like this (IE):
<P ALIGN=center>
<OBJECT WIDTH="500" HEIGHT="400"
CODETYPE = "image/cgm"
CLASSID="CLSID:F5D98C43-DB16-11CF-8ECA-0000C0FD59C7">
<PARAM NAME="FileName" VALUE="T1-1.cgm">
</OBJECT>
I've got also a script linked to this page loaded via function window.onload() that must scan the current repertory and make some thing (build an XML file with the name of each of them), like this:
function window.onload() {
var fs = new ActiveXObject("Scripting.FileSystemObject");
var folder = fs.getFolder("nomenclature");
var xmlDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
var e, fileObject, fileElement, title, nom, text;
var folderElement = xmlDoc.createElement("repertoire");
xmlDoc.appendChild(folderElement);
e = new Enumerator(folder.files);
for (;!e.atEnd();e.moveNext())
...
Problem: the second lign (var fs= new ActiveXObject("Scripting.fileSystemObject") generates the following error:
Can't Access File Adress
When I don't load the first controle ActiveX, this second ActiveX Object runs well.
So what can I do so that they can't enter in conflict ?
Thanks a lot for your answer,
Steevy.