aspose file tools*
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 Soft Skills 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
Author

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");
mydom.load(locationtofile);

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Activex xmldom nightmare