Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying file information on my website, please help!

Status
Not open for further replies.

dadougalee

Programmer
Jul 29, 2005
10
US
I have xml documents on a server that the website is on as well. I need to parse the xml files and display the information on the website. I am using javascript to parse the data, and display it. But my problem is retrieving this data in the first place. I was told javascript cannot deal with ftp, so I think I need to do this from the html code. Does anyone know how to grab files over ftp and display the information on the website? Any help would be greatly appreciated, thanks guys!

Doug
 
You will need to use a server side scripting language such as PHP, ASP, ColdFustion or PERL.

Do you have any of these technologies available to you on your server?

A quick google or visit to sites such as should turn up some ready made XML parsers for you in the language of choice.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
That is a good idea, but I already know how I want to display the xml information. My real problem is locating the xml file on the server and grabing the information. There are multiple xml documents. The xml documents are located in a subdirectory of the server. I am using Microsoft's IIS. In javascript it works doing this with the FileSystemObject:

var foldedToList = "C://inetpub//ftproot//FTP"

I then have it check that folder for documents, and obviously it only would work on the computer that has this file, but I want it to check a folder on the server. I want to do this:

var foldedToList = "
and check that folder, but it won't allow me to do this.
 
I have this as a virtual directory already, but as you can already mostly likely tell, I am very new to all of this. I can access the files via by typing in the files path on the server in the address bar, but I am unfamiliar how to load them into my website in order to parse the data.
 
You don't need to ftp. Just put the files in a regular directory on your server and access them as you would an HTML file. For example: (ignore the parsing bug in FF!).

That said, I'd agree with Foamcow that it's better to parse the XML server-side if possible - browsers are too inconsistent in their XML processing abilities to be entirely trusted with the job.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top