Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: Thumbnails

  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbnails

    When using thumbnails of photos, how do you set up the code so that the full-sized photo is centered after the thumbnail is clicked?
    Thanks
    Jack

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Jack, are you meaning to show the enlarged picture on the smae page as the thumbnail??? The simplest way is to have another page with the enlarged image along with whatever else you want to show on that page. Clicking on the thumbnail takes you to the new page.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Hi Mike;
    I am showing the large image on a different page from the thumbnail but the image always shows up hugging the left of the screen. I want to center it. Do you know how to do it?
    Here is the code I'm using:
    <Font size="2">[img]graphics/smblockade.jpg[/img]
    Jack

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles, California, USA
    Posts
    1,734
    Thanks
    0
    Thanked 3 Times in 1 Post

    Re: Thumbnails

    There's better ways of doing it than that. Go to one of the Javascript sites - there are lots of scripts that will do what you want.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Eileen_sig.gif>

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Sorry Eileen but I'm just learning and haven't got to JAVA script yet.
    Before that I want to go through all the basic stuff.
    Thanks though.
    Jack

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Have a look at this script from the <A target="_blank" HREF=http://javascript.internet.com/page-details/thumbnail-viewer.html>JavaScript</A> site. A new window is opened to the exact size of the larger image - you may find this more aesthetically pleasing.
    Let us know if you need help adding the script - I'm sure we can walk you through it OK.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Jack,

    Here is an easy HTML way to do it.

    The idea is that you have to present the enlarged image in a document, rather than link to the image itself.

    Instead of your link being

    <pre><Font size="2">
    <A HREF= "graphics/blockade.jpg">
    [img]graphics/smblockade.jpg[/img]
    </A>
    Blockade, collage on board.</FONT>
    </pre>


    use

    <pre><Font size="2">
    <A HREF= "graphics/blockade.html">
    [img]graphics/smblockade.jpg[/img]
    </A>
    Blockade, collage on board.</FONT>
    </pre>


    then, create blockade.html to include only

    <pre><table align="center">
    <tr align="center" valign="middle">
    <td align="center" valign="middle">
    [img]graphics/blockade.jpg[/img]
    </td>
    </tr>
    <table>
    </pre>


    Another alternative that uses JavaScript would create a pop up window that is the same size as the graphic so that centering is not important. Do you want that code?

  8. #8
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Thanks Leif. I copied the code and will save it as a resource.
    Jack

  9. #9
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    HTML seems to be the way I will do it.
    Thanks for your time. I haven't reached javascript in my exploration, so that will come later.
    This is great.
    Regards,
    Jack

  10. #10
    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: Thumbnails

    If you have a lot of images, you could end up with a lot of little pages to maintain. If your web server supports ASP, you could do it this way:

    Page linked from:

    <Font size="2">
    <A HREF= "graphics/fullsize.asp?blockade.jpg">
    [img]graphics/smblockade.jpg[/img]</A>
    Blockade, collage on board.</FONT>

    Page linked to (fullsize.asp):

    <table align="center">
    <tr align="center" valign="middle">
    <td align="center" valign="middle">
    [img]<%=Request.QueryString%>[/img][/b]">
    </td>
    </tr>
    </table>

    I haven't test this out (!), but in theory it should work. If you want to get fancy, you can pass both the file name and a string of ALT text, but this should be enough to get started.

  11. #11
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles, California, USA
    Posts
    1,734
    Thanks
    0
    Thanked 3 Times in 1 Post

    Re: Thumbnails

    USE that code! It's the easiest thing in the world to copy it into your page - just follow the instructions. It's infinitely easier than making all those HTML pages you'll have to do if you go what you *think* is the easy way!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Eileen_sig.gif>

  12. #12
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Hi there.
    I tried the suggested code, but it doesn't seem to work.
    Should I change the fullsize file name so it reads just like the code?
    Jack

  13. #13
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    OK - I've just had a closer look and I don't think it is as smart as I first thought - I think you have to define the size of the new window which is probably not what you want.
    Hold on while I see if there is something else . . .

  14. #14
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Nope - I think it will do.

    Have a look at this <A target="_blank" HREF=http://www.looflirpa.com/demo.htm>demo page</A> and see if it gives you anything like what you want.

    If it does, you should be able to grab the code for it and see how it works - otherwise shout.

  15. #15
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Rothesay, New Brunswick, Canada
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Thumbnails

    Sorry Leif, but the images don't call up another link which is centered.
    Thanks for trying.
    Jack

Page 1 of 2 12 LastLast

Posting Permissions

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