Connecting Tech Pros Worldwide Help | Site Map

Using AJAX (XmlHttpRequest) to load images

  #1  
Old March 23rd, 2006, 04:45 PM
dean.h.brown@gmail.com
Guest
 
Posts: n/a
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!

  #2  
Old March 23rd, 2006, 07:35 PM
Ian Collins
Guest
 
Posts: n/a

re: Using AJAX (XmlHttpRequest) to load images


dean.h.brown@gmail.com wrote:[color=blue]
> 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)
>[/color]
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.appendChild( img );

--
Ian Collins.
  #3  
Old March 23rd, 2006, 10:35 PM
ajaxtoday
Guest
 
Posts: n/a

re: Using AJAX (XmlHttpRequest) to load images


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

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill the parent window height using 100% soms2m answers 1 April 17th, 2008 11:06 AM
Using XPATH in Mozilla newToAjax answers 1 June 29th, 2007 09:41 AM
load external html vs 2005 Jeff Allan answers 2 November 30th, 2006 11:05 PM
"AJAX" - sending but don't need response? Tony answers 20 March 21st, 2006 10:55 AM