Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next
ActiveX not possible?
Author Message
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Hi,

I try to use a Scripting.FileSystemObject in my HTML window to determine whether a certain file exists. In the preview this works like a charm but the final HTML window doesn't show anything.

Is there another way?
Karsten
DVD Collectors Online

DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
The Scripting.FileSystemObject is marked as not safe for scripting. If you open a HTML page that uses it in IE, you will get a security warning. Depending on your IE settings, you may be able to proceed with the object creation. In DVDProfiler's HTML windows, creation of unsafe objects is not possible.

You either have to write your own helper object that is safe for scripting, or you can use the following crude hack:

var oXml = new ActiveXObject("msxml2.DOMDocument");
oXml.validateOnParse = false;
oXml.resolveExternals = false;
oXml.async = false;
oXml.load("<filename>");

This will of course always fail, unless your file is indeed an XML file, but you will get different error codes, depending on the reason.

switch (oXml.parseError.errorCode) {
  case -2146697210:
    // File not found
    break;
  case -2147024893:
    // Path not found
    break;
  default:
    // File exists
}
Matthias
 Last edited: by goodguy
Invelos Software, Inc. RepresentativeKen Cole
Invelos Software
Registered: March 10, 2007
United States Posts: 4,282
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Matthias is correct and this is by design to prevent malicous scripts within uploaded layouts.
Invelos Software, Inc. Representative
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Okay, thx, I'll try the DOM hack.
Karsten
DVD Collectors Online

DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
thx again, it worked
Karsten
DVD Collectors Online

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next