Click to See Complete Forum and Search --> : Pictures in table


half-wit
11-18-2003, 08:34 AM
I have a website and I want the pictures to load in a table but I don't want to create a page for every picture. Is this possible? I would prefer to stay away from frames.

pyro
11-18-2003, 09:05 AM
What server-side languages do you have available?

half-wit
11-18-2003, 09:42 AM
Basically, I'm developing a personal website from a template I got. My wife wants something to show pictures at work. I will upgrade but for now I am developing on Comcast's free space. I would imagine they accept PHP but I could be wrong. I'm new to all this so be kind.

Here's a link...

http://home.comcast.net/~caquiroga/

I want to click on a thumbnail and have it open in the middle table where the thumbnails reside.

pyro
11-18-2003, 09:44 AM
To check if they support PHP:

test.php
<?PHP
echo "I have PHP!";
?>

half-wit
11-18-2003, 09:52 AM
Sorry for my lack of PHP knowledge but how can I get this to even preview on my local side? It doesn't open on Comcast and I can't preview it either. My guess would be that they don't support MySQL

pyro
11-18-2003, 09:54 AM
It doesn't use MySQL. That was mearly a simple test to see if your server supported PHP. It appears that it does not. To view PHP on your local computer, you would have to have a testing server set up with PHP installed.

TheBearMay
11-18-2003, 10:11 AM
Here's a little Javascript you could try.


<script>
function ViewThumbnail(image_id,window_width,window_height){
if (window_height < 200) window_height=260; else window_height=window_height+50;
if (window_width < 300) window_width=330; else window_width=window_width+50;
ViewWin=window.open(image_id,"ThumbView"," status resizable width="+window_width+" height="+window_height);
ViewWin.focus();
}
</script>
.
.
.
<tr>
<td><img src='ThumbnailImage.jpg' width=200 height=150 onclick='ViewThumbnail("FullSizePhoto.jpg",640,480)'/>
</td>
<td>
.
.
.

If you don't want to create a thumbnail photo you can use the full size photo, but your page may take a little longer to load.

Aronya1
11-18-2003, 11:35 AM
Originally posted by half-wit
I have a website and I want the pictures to load in a table but I don't want to create a page for every picture. Is this possible? I would prefer to stay away from frames.
There's no need to create separate pages for each picture. Create thumbnail images & display them in your table. Then just link each thumbnail to it's full-size image. Your system will display the image in whatever program is designated to handle that particular file format.

half-wit
11-18-2003, 12:15 PM
I understand what you are saying but it opens the picture in Internet Explorer. It may seem picky but I would like the viewer to be able to click on a picture and it opens the picture in a table. The viewer is than able to use a forward or back button to go through the remaining pictures. I'll look for an example site..

Aronya1
11-18-2003, 12:44 PM
OK, I misunderstood what you originally meant by "load in a table." As has already been suggested, you will either need to create separate pages, or use something like javascript (client side) or php (server side).

TheBearMay
11-18-2003, 01:59 PM
Not exactly what you're asking for but this may work for you.

<html>
<head>

<script>
function ViewThumbnail(image_id)
{
ImageDisp.src=image_id;
TableDiv.style.visibility='hidden';
ImageDiv.style.visibility='visible';
}
</script>
</head>
<body>
<div id='TableDiv' style='position:absolute'>
<table>
<tr>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
</tr><tr>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
</tr><tr>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
</tr>
<tr>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
<td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td><td><img src='Thumbnail.jpg' width=150 height=100 onclick='ViewThumbnail("FullSizePhoto.jpg")'/>
</td>
</tr>
</table>
</div>

<div id='ImageDiv' style='position:absolute; visibility:hidden' onclick='ImageDiv.style.visibility="hidden"; TableDiv.style.visibility="visible";'>
<img id='ImageDisp'/>
</div>

</body>
</html>