ActiveX Javascript Offline

Q

quadraticformula

So today I had my mind set on doing this project that can move around
itunes files over a network with a javascript. In order to do that it
has to read the itunes library xml file. I thought this would be a
fairly easy task, but unfortunately i'm a beginner and I couldn't even
get an object to read the xml to work in the first place.

I have this file "test.js"
-----------------------------------
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
var xmlObj;
xmlDoc.async="false";
xmlDoc.load('xml_file.xml');
xmlObj=xmlDoc.documentElement;
alert(xmlObj.xml);

for whatever reason, when I execute the javascript in explorer (double
click it) it fails miserably at line 6 with an "object expected
error". but if I include the javascript into an html file it works
exactly as expected (simply printing the xml contents in an alert
box).

why oh why does this not work when executed through explorer. is
activeX not supported in that case? Well that cant be true becauase
otherwise the script at
"http://ottodestruct.com/itunes/EvilLyricsImport.txt" wouldn't work.
(it uses the activeX, but says it can be executed from explorer)

If anybody can help this newbie out, it'd be great. I appreciate all
the help I can get. Sorry if I rambled...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top