File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Activex xmldom nightmare Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Activex xmldom nightmare" Watch "Activex xmldom nightmare" New topic

Activex xmldom nightmare

Graham VMead
Ranch Hand

Joined: Sep 22, 2003
Posts: 154
Hi I'm relatively new to Javascript but I wonder if someone can help

I've got a JSP generated HTML page (using struts) with embedded Javascript. In the javascript I'm trying to load an XML file using ActiveX e.g

mydom = new ActiveXObject("microsoft.xmldom");

I'm having a mare of a time trying to specify the file location.
As far as I'm aware the javascript will be running on the client.

1) Is there a concept of a "current" directory, if so how do I find out what on earth it is (maybe via javascript)!!! I've tried one solution on the net "window.location.href" but all that gives me is the URL to the JSP not the local location (if there is one);

2) What form should the "locationtofile" take, can it be relative to a current directory or does it have to be absolute???

TIA Graham
[ October 12, 2005: Message edited by: Graham VMead ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Linking to the XML file is the same as linking to an image, external js file, css file, another page etc. So all the same rules apply.

I agree. Here's the link:
subject: Activex xmldom nightmare
It's not a secret anymore!