SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2000
    Location
    Antwerp, Belgium
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I would like to make a thumbnail gallery but I have a problem.

    In these gallery each page would have 15 thumnails (thumbnail name
    example: t_mtga001_JPG.jpg, name given by portofolio), a next and/or
    previous page button and a close the window button.

    So far so good, now, when you click on a thumbnail a new page should
    open in the same window and on this page there would be the original
    picture (name example: mtga001.jpg) and a back button (gif image). If
    you click on the back window you should see the gallery page you came
    from and the thumbnail you clicked should have a vlink color.

    The only way I could get this result is by making a page (original image
    and button) for every thumbnail. So for 250 thumbnails, I would have 250
    pages. That's too much...

    Is there a way I could do this in javascript? Opening a new page is not
    a problem, but having the script taking the right original, based on its
    name and having the back button
    loading in the right place and sending you back to the right gallery is!

    Thanx for your help,

    Jean-Luc

  2. #2
    SitePoint Addict
    Join Date
    Apr 2000
    Location
    Winchester, Hampshire, England
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got this from this forum so if I don't make it clear fish around and find the origional post.

    You make a page with this code in it:

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    document.writeln("<TABLE WIDTH=100% HEIGHT=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>");
    document.writeln("<TR><TH ALIGN=CENTER BGCOLOR=#000000><A HREF=\"javascript:history.back();\"><FONT COLOR=white>Back To thumbnails</FONT></A></TH></TR>");
    document.writeln("<TR HEIGHT=100% VALIGN=MIDDLE><TD ALIGN=CENTER><IMG SRC=\"" + location.search.slice(1) + "\" ALT=\"Photo\"></TD></TR>");
    document.writeln("</TABLE>");
    //-->
    </SCRIPT>

    And then link to it using this link:

    <a href="closeup.htm?gfx/largeimage/b3.jpg">

    The bit after the ?htm is the route to the full sized picture.

    Hope you can make sense of that!
    You can see it working at: http://www.ukwoodcraft.co.uk

    peter

  3. #3
    SitePoint Member
    Join Date
    Jul 2000
    Location
    Antwerp, Belgium
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Peter,

    I'll try it tonight and will tell you tomorrow how it worked.
    thnx,

    Jean-Luc


Bookmarks

Posting Permissions

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