Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Click on Thumbnail

    I am working on a website (1st timer) and am looking for guidance on clicking a thumbnail picture and having it enlarge so that the picture can be viewed better.

    Thanks,
    John

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Click on Thumbnail

    Are you going to have two different images (i.e., one that is very small and one that is full sized)? This usually gives better performance than loading all of the images and just setting their <img> tag dimensions to be small.

    I like the way Amazon does its additional images, but you also can use a pop-up window, that's very common. Generally, most page layouts cannot tolerate changing the size of the image in the page itself, but if you prefer that, I'm sure it could be done.

    So... what did you have in mind?

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Click on Thumbnail

    Let's try a pop-up window.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Click on Thumbnail

    You could try this:

    [img]thumbnail.jpg[/img]

    The JavaScript method window.open has a lot of options; of particular interest might be setting the height and width of the window.

    Without using java script:

    [img]thumbnail.jpg[/img]

    (If you like a border around the img, you can remove the border="0")

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Click on Thumbnail

    I tried your suggestion however the page can not be displayed. I modifed to script to the correct path where the jpg file exists.

    Any suggestions,
    John

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Click on Thumbnail

    My other suggestion is to find a site you like and look at their script. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Click on Thumbnail

    John

    Any chance you could just pop the code you have in a text file and let us have a look at it via a post attachment. We should be able to solve it much easier that way <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

  8. #8
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Click on Thumbnail

    Go here: Dylan Ellis Hoffman to look at a page about my second grandson and then do a View Source. The javascript is very short and it's between the script and /script tags. Then, down in the body of the page, pick any one of the table entries and you can see how I 'call' the javascript to display a small thumbnail and larger picture. If this doesn't suit your fancy, there are programs out there that are free and will create web pages for you with thumbnails and larger pictures. I'd bet if you search The Lounge you'll find a couple of references.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •