Solved

Ajax - Can u get access to Files on Server via Ajax?

Posted on 2006-06-09
1
212 Views
Last Modified: 2010-04-06
I am trying to read images that are being stored and deleted periodically on one of the directories on my server. What I want to do is create a slideshow of these images. This would be easy using javascript, but since  I don't  know how many images to work with, and since the images are on my server, that makes it a bit harder. I tried doing this via server side code already, but encountered a few problems.. See below link. Anyway, I know javascript can't access my server file, but can Ajax? If so.. can you provide a source or example where I can get started?

Thanks in advance.

my server side code attempt.. close.. but not quite there...

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21880206.html
0
Comment
Question by:LeeHenry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
nschafer earned 500 total points
ID: 16872844
Hi LeeHenry,

Yes, AJAX can do this.  AJAX in a simplistic description allows communication between server-side and client-side scripts.  I don't use ASP.NET, so I can't explain how to do it using ASP.Net, but using classic ASP you would have two pages.  An HTML page that would display the images.  There would be a javascript function making an AJAX call to determine the next image to show.  The AJAX function would get the results of an ASP page that would use the File System Object (FSO) to read the directory of the folder where your images are stored and send the url path to the file back to the javascript function.  

The javascript function would probably have to send back to the ASP page an index number of the image it is currently displaying so that the ASP page would know which image needed to be displayed next.

Hope this helps,
Neal.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question