Re: Cannot get this one correct and working, though simple!
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Cannot get this one correct and working, though simple!

From: Lüpher Cypher <lupher.cypher@verizon.net>
Date: Fri Dec 30 2005 - 09:42:48 CET

Jofio wrote:
> I have 40 or jpeg files which I want them displayed in a frame called
> "main" upon clicking thumbnails of the same pics in a "leftMenu" frame.
> The thumbnail jpeg files are called thumb1, thumb2, thumb3, thumb4,
> ..., thumb40. These files are smaller versions (50pixelX50pixel) of the
> larger jpeg files called 1, 2, 3, 4, ..., 40 which I want them
> displayed.
>
> To display the hyperlinked thumbnails in the "leftMenu" frame I have it
> in a loop. [See the code snippet]
>
> But my problem is that part of the code ...<img src='thumb$i.jpg'> ...
>
> It doesn't display the intended thumbnail jpeg files; instead, it
> display the larger version of the files as thumbnails which takes
> longer to load.
>
> Here's my loop:
>
> <?php
> for ( $i = 1; $i < 40; $i++) {
> if ($i!=17) {
> echo "<a href='$i.jpg' target='main'><img src='thumb$i.jpg'></a>
>
> }
> }
> ?>
>
>

This should work perfectly well.. Check the left frame source - the
<img> tags should have thumbs as sources. If they do, check the size of
the thumb files - perhaps, they are large?

luph
Received on Tue Jan 3 03:50:09 2006