Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Downloading Images Using Ajax - Ajax Tutorial 34

Loading...

Sign in or sign up now!
4,254
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 14, 2008

http://www.ajaxtraining.blogspot.com - Downloading Images Using Ajax|Page update without refresh using Javascript, PHP and XML's XMLHTTPRequest object (also known as 'remote scripting')

  • likes, 2 dislikes

Link to this comment:

Share to:
see all

All Comments (11)

Sign In or Sign Up now to post a comment!
  • that ajax example is use ajax to get the file name, not get the image. It use the img tag in html to load the image, it use innerHTML to set the html inside "targetDiv", so it just dynamic to change the "src" attribute. You may load all the image name first when the website load(that means use javascript: var imagesName = new Array();imagesName[0] = "image1.jpg";imagesName[1]= "image2.jpg"). then, when someone click the preview icon, it use the image name as the src of the img tag.

  • It work, I have tryed on Ubuntu 9.04 FireFox 3. If you need, I can give you code and images :-)

  • I tried. This code didnot work.

  • very straight foward, thank you

  • hi, i use wysiwyg web builder 5, im not a coder but am making an online portfolio and want to incorporate this no refreshing function within the whole site... basically someone can click on the preview icons of my photos and then it loads the bigger image in a diefferent section of the site. is this possible using your code from here? and could i paste it directly into wysiwyg? thanks..

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more