?
Solved

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

Posted on 2006-06-09
1
Medium Priority
?
214 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

762 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