New image without page refresh !!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • onlymars
    New Member
    • Mar 2008
    • 13

    New image without page refresh !!

    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.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Change the image's src property:
    Code:
    img.src = newsrc;

    Comment

    • onlymars
      New Member
      • Mar 2008
      • 13

      #3
      couldn't understood ur point, please can u elaborate it further.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Post your HTML code (just one or two examples of thumbnails and the main image will do).

        Comment

        • onlymars
          New Member
          • Mar 2008
          • 13

          #5
          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.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            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.

            Comment

            Working...