You are here: Re: Cannot get this one correct and working, though simple! « PHP Programming Language « IT news, forums, messages
Re: Cannot get this one correct and working, though simple!

Posted by Lόpher Cypher on 12/30/05 10:42

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

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация