eg said:
Ah ha Trevor - found it. I went back to your page because I was sure it
worked the way you said it does .. so I was determined to find out why
didn't
it work for me. I have pop-ups blocked. Once I allowed the pop-ups, I
was
able to click on an image and voila! it was the enlarged picture. I would
appreciate seeing your 'cut down' version of the code.
Thanks again Trevor!! Ellen
Great, Ellen
And good timing. I have just finished it and tested it
I placed all the code on:
http://tandcl.homemail.com.au/testgall/
The test page is
http://tandcl.homemail.com.au/testgall/testgall.html
This displays a thumbnail
http://tandcl.homemail.com.au/testgall/images/trevor_t.jpg
When the picture or text is clicked, Javascript inside testgall.html opens:
http://tandcl.homemail.com.au/testgall/pictures.html
passing to it these parameters
"?picture=images/trevor.jpg&caption=Trevor&height=500&width=500"
These are read by the Javascript inside pictures.html and a new page is
opened, displaying
http://tandcl.homemail.com.au/testgall/images/trevor.jpg
So the code you need is
http://tandcl.homemail.com.au/testgall/testgall.html
http://tandcl.homemail.com.au/testgall/pictures.html
[Many thanks to those whose code I have amended a bit, mainly Steve Easton
and Jim Cheshire}
The images you need are
http://tandcl.homemail.com.au/testgall/images/trevor_t.jpg
http://tandcl.homemail.com.au/testgall/images/trevor.jpg
(or actually your own images - these are just test pictures of me taken
several years ago, when I was a bit less ugly than now)
The heart of the code in testgall.html which you need to change is:
<table>
<tr>
<td>
<a href='nojsmess.html' target="_self"
onclick="newWindow('images/trevor.jpg','Trevor');return false;">
<img src="images/trevor_t.jpg" alt="" title='Click to see a larger
picture' /><br />
Click to see a larger picture
</a>
</td>
</tr>
</table>
Just add new cells to this table for each picture, changing the image names
and the captions
nojsmess.html is just a small .html file containing a message when
JavaScript is not present. All it needs in the <body> is
<h3>This site requires Javascript enabled</h3> .
The code works without it (provided JS is present).
You will need to do some cutting from the code on my site (View Source in
IE) and pasting it to your site (using Code or HTML view) to place this code
where you need it. Please get back if you need help with this
--
Have fun,
Trevor Lawrence
Canberra
Microsoft MVP - FrontPage
MVP Web Site
http://trevorl.mvps.org