Solved

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

Posted on 2006-06-09
1
209 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
1 Comment
 
LVL 19

Accepted Solution

by:
nschafer earned 500 total points
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now