Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6163019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:45:20+00:00 2026-05-23T21:45:20+00:00

Short of going for something like Galleriffic and modifying, hiding and removing elements, what

  • 0

Short of going for something like Galleriffic

and modifying, hiding and removing elements, what would be a way to add a function by which thumbnails can also be clicked to display the image?

Much obliged to anyone who can point me in the right direction. I’m using the following by Paul McFedries at mcfedries.com.

<script type="text/javascript">
<!--
// Use the following variable to specify 
// the number of images
var NumberOfImages = 3

var img = new Array(NumberOfImages)

// Use the following variables to specify the image names:
img[0] = "yellow1.jpg"
img[1] = "blue2.jpg"
img[2] = "green3.jpg"


var imgNumber = 0

function NextImage()
{
    imgNumber++
    if (imgNumber == NumberOfImages)
        imgNumber = 0
    document.images["VCRImage"].src = img[imgNumber]
}

function PreviousImage()
{
    imgNumber--
    if (imgNumber < 0)
        imgNumber = NumberOfImages - 1
    document.images["VCRImage"].src = img[imgNumber]
}

</script>

in the html:

    <div class="galleryarrows">
<A HREF="javascript:PreviousImage()">
<IMG SRC="previous.png" BORDER=0></A>
<A HREF="javascript:NextImage()">
<IMG SRC="next.png" BORDER=0></A>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:45:20+00:00Added an answer on May 23, 2026 at 9:45 pm

    A quick, basic solution: Save the full size versions of your images in a folder called say, ‘full_images’, with the same names as the thumbnails.

    Add an onClick event into the element img elements that display your thumbnails in the html, so they look something like this.

    <img src = "yellow1.jpg" name = "thumb[0]" style = "cursor:pointer" onClick = "Javascript:DisplayImage(0);" alt = "yellow"/>
    <img src = "blue2.jpg" name = "thumb[1]" style = "cursor:pointer" onClick = "Javascript:DisplayImage(1);"  alt = "blue"/>
    <img src = "green3.jpg" name = "thumb[2]" style = "cursor:pointer" onClick = "Javascript:DisplayImage(2);"  alt = "green"/>
    

    In your javascript, add this function

    function DisplayImage(id){
           imgNumber = id;
           document.images["VCRImage"].src = "full_images/" + img[id];
    

    }

    This will display in an element with the name ‘VCRImage’.

    Not my favourite solution this, but quick, and should work. If Javascript is new to you, then you might as well check out jQuery. It’s a lot easier to use, and is way more cross-browser compatible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like there's something rather basic I'm missing here, which I previously thought
I'd like to add some kind of library, or maven plugin, or 'something' to
I have a web form, for the contents of which I would like to
Short version: What's the best practice going forward for efficiently rendering large numbers of
Short version: I'm trying to determine the best way to track what the user
Short of recursing and comparing dates of files/directories, is there a better way of
I would like my class to be: class NumberedString : public Object { public:
I'm using Django forms in my website and would like to control the order
Just a very short question about DropBox - is there any way to find
I'm designing a new system to store short text messages [sic]. I'm going to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.