codeclown
02-27-2006, 09:41 AM
I'm a php newbie,
trying to create a product catalogue from an SQL DB, (adapted from the Janet Valades famous Pet shop example)
I want to open up a new browser window showing full size product images
from the thumbnail.
The thumbnail images are generated from a $row query I want to href these thumbnails with the popup link and pass the large image variable to the pop up window for each $row, but it's not havin' it, any ideas please?
The coded page is here
http://www.austingardner.com/2903globe/Showglobes2.php?categ=Wicket%20Keeping
the relevant code looks like this
if ( $ncolors <= 1 )
{
//display row for each color if product comes in one color only//
echo "<td class='bodytext'><a href='#' onClick='MM_openBrWindow('prodpop.php?image={$row['pix']}','Globesports','width=550,height=550')'>
<img src='{$row['pixthumb']}' class='thumbnail'
width='130' height='120'></a></td>\n";
}
// display row for each color if product comes in colors //
if ($ncolors > 1 )
{
while($row2 = mysql_fetch_array($result2,MYSQL_ASSOC))
{
echo "<tr><td colspan=2> </td>
<td class='bodytext'>{$row2['globeColor']}</td>
<td><<a href='#' onClick='MM_openBrWindow('prodpop.php?image={$row2['pix']}','Globesports','width=550,height=550')'>
<img src='{$row2['pixthumb']}' class='thumbnail'
width='130' height='120'></a></td>\n";
}
}
echo "<tr><td class='bodytext' colspan='5'><hr size='1px' class='rule'></td></tr>\n";
}
trying to create a product catalogue from an SQL DB, (adapted from the Janet Valades famous Pet shop example)
I want to open up a new browser window showing full size product images
from the thumbnail.
The thumbnail images are generated from a $row query I want to href these thumbnails with the popup link and pass the large image variable to the pop up window for each $row, but it's not havin' it, any ideas please?
The coded page is here
http://www.austingardner.com/2903globe/Showglobes2.php?categ=Wicket%20Keeping
the relevant code looks like this
if ( $ncolors <= 1 )
{
//display row for each color if product comes in one color only//
echo "<td class='bodytext'><a href='#' onClick='MM_openBrWindow('prodpop.php?image={$row['pix']}','Globesports','width=550,height=550')'>
<img src='{$row['pixthumb']}' class='thumbnail'
width='130' height='120'></a></td>\n";
}
// display row for each color if product comes in colors //
if ($ncolors > 1 )
{
while($row2 = mysql_fetch_array($result2,MYSQL_ASSOC))
{
echo "<tr><td colspan=2> </td>
<td class='bodytext'>{$row2['globeColor']}</td>
<td><<a href='#' onClick='MM_openBrWindow('prodpop.php?image={$row2['pix']}','Globesports','width=550,height=550')'>
<img src='{$row2['pixthumb']}' class='thumbnail'
width='130' height='120'></a></td>\n";
}
}
echo "<tr><td class='bodytext' colspan='5'><hr size='1px' class='rule'></td></tr>\n";
}