By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,979 Members | 960 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,979 IT Pros & Developers. It's quick & easy.

New image without page refresh !!

onlymars
P: 13
helloo guys, i have an image gallery page which have thumbnails at the bottom of the screen and the main image is in the middle of the page, i want that users click on the thumbnail pic's and the main image changes accordingly but with out a page refresh.

have searched a lot but am not getting a solution, your help will be very appreciated. thanx.
Nov 13 '08 #1
Share this Question
Share on Google+
5 Replies


acoder
Expert Mod 15k+
P: 16,027
Change the image's src property:
Expand|Select|Wrap|Line Numbers
  1. img.src = newsrc;
Nov 13 '08 #2

onlymars
P: 13
couldn't understood ur point, please can u elaborate it further.
Nov 13 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Post your HTML code (just one or two examples of thumbnails and the main image will do).
Nov 13 '08 #4

onlymars
P: 13
following is my test page,

http://www.imsciences.edu.pk/test/academic/

i want to click on any thumbnail image at the bottom and the main image at center get refreshed accordingly to that. how can this be done. really am struggling.
Nov 13 '08 #5

acoder
Expert Mod 15k+
P: 16,027
OK, first of all give your main image an ID so that you can refer to it (link).

Now, you need to set src property of this element - see example - adapt it to your requirements.
Nov 13 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.