javascript relative path to load xml file

Joined
Feb 25, 2009
Messages
1
Reaction score
0
The file/folder structure is like

root/one/index.htm
root/one/files/images/picture.jpg

root/two/index.htm
root/two/files/images/pict888.jpg

root/shared/files/js/test1.js
root/shared/files/xml/datafile.xml

.
.
The index.htm files in folder one and two has reference to .js file -----

<script src="../shared/files/js/test1.js" type="text/javascript"></script>​

in head section. That is simple.

.

Now the .js file has code to open xml file as follows:


xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("path");

QUESTION 1 what this path could be?
.
.
.
.
there are pictures on index.htm in one and two which come from respective files/images folders, but their path is obtained from .xml file

<row1 id="1" imageurl="imagepath" rowtitle="title">desctiption test</resrow>​
QUESTION 2 what this imagepath could be?
.
.
.
QUESTION 3 For the above file/folder structure do path and imagepath change depending its on location - local machine or web server?

Thanks
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top