473,828 Members | 2,885 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using AJAX (XmlHttpRequest ) to load images

I'd like to create a slideshow using the same technology that Google
Maps uses:
Load/unload images offscreen and the user can drag the images around.

Dragging the images is easy
(http://www.walterzorn.com/dragdrop/dragdrop_e.htm)

But I haven't found a way to load the images as needed (There may be
100's so I don't want to load them all when the page loads)

Thanks!

Mar 23 '06 #1
2 32526
de**********@gm ail.com wrote:
I'd like to create a slideshow using the same technology that Google
Maps uses:
Load/unload images offscreen and the user can drag the images around.

Dragging the images is easy
(http://www.walterzorn.com/dragdrop/dragdrop_e.htm)

But I haven't found a way to load the images as needed (There may be
100's so I don't want to load them all when the page loads)

You don't need AJAX, just create a new img element and add it to your page.

var img = new Image( width, height );
img.src = <some URL>;

someContainer.a ppendChild( img );

--
Ian Collins.
Mar 23 '06 #2
May be you can use AJAX to fetch urls for the images for each slide
from the server and assign it the src property of IMG element, browser
will read the image and show it for you.

- Rafiq.
http://www.ajaxtoday.com

Mar 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1569
by: boeledi | last post by:
Hello, I am developing in ASP.NET 1.1 (and unfortunately I am obliged to use 1.1). I need to generate images, using GDI+ and retrieve them on the web page, using AJAX. On the server side, I have a ASPX page that generates the bitmap and has to return it, when invoked by the client, via AJAX (XMLHTTP). Here
5
3229
by: lucyh3h | last post by:
Hi, I am trying to use XMLHttpRequest to do server side validation. I have several fields on a form and a submit button. The submit button has an event assocated with it when clicked. The javascript method will do the form validation for each field one by one. For each field, an XMLHttpRequst will be made to a PHP file and get the return, either set an error field (<span>'s innerHTML) or leave it empty. Then I'll check the error field...
13
4010
by: Marvin Zhang | last post by:
Hi, I'm not familiar with web programming, but I have a problem here. I have a page. When a user click one button on it, I will use AJAX to request a PHP script which will do a bunch of tasks, asynchronously. These tasks might take long time so I want to keep the user informed of the progress. The problem is that only the PHP script knows the progress, how can the web page gets these information from PHP script?
2
2037
by: lintolawrance | last post by:
hai friends, i need some help from u.i am trying to work with Ajax.i done some codes for developing dropdownlist using ajax.but it doesn't work.please help me to develop it. Javascript Codes ------------------------ <script type="text/javascript"> var xmlHttp; function createXMLHttpRequest() {
5
4471
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know if I have the entirely wrong approach, but my code is below. Any or all help is appreciated! What currently happens is that the getdivision.php script works perfectly and gives me an entire table of correct data. The problem is that when I click...
1
1989
by: mfaisalwarraich | last post by:
I am trying to get values posted by a form using ajax but i dont know how to get them. im opening a form which is also based on the ajax. here is the code. function showPage(page) { var url=page; //url=url+"?q="+page; //url=url+"&sid="+Math.random(); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
1
1976
by: burtonfigg | last post by:
I have an ecard site. Part of that site allows users to enter their own message which then appears within a flash SWF file. This is an example page: http://jimpix.co.uk/ecards/4560-type-your-own-message.html And this is the example HTML that is used to display the SWF file using SWFObject: <div id="swfcontainer"> <div id="myContent"></div>
5
3588
anfetienne
by: anfetienne | last post by:
hi, I am using ajax to load external pages into a div layer... my reason for this is when in a certain section of the site the transition is smooth with no white flash. my problem is that when a page has been loaded into the div layer I have a custom scroll which i use for div box overflow... the scroller is not being included, my div layers all resort back to the generic standard browser scroll bar. how can i load the external .js ile...
0
9773
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10751
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10467
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6936
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5612
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5769
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4406
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3951
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.