[FX.php List] only showing 1st image from container field inforeach loop

Alex Gates alex at gandrpublishing.com
Fri Aug 25 11:59:57 MDT 2006


Hi Chris,

Thanks for your response.  I did try Firefox and IE on PC and Firefox
and Safari on Mac - there were no differences.
That being said, I have scrapped that solution and am now building a new
one.
For some reason, the layout that would only show one started showing the
images except for the images from 5 or 6 records.  Strangely, I simply
duplicated that layout in FileMaker and renamed the layout to remove the
space before "Copy" - and when I changed my php to the new layout, all
the images displayed properly.  I, of course, changed my php back to the
original layout to test, but it was still not showing some of the
images.  They layouts were exactly the same, but for some reason, one
worked and the other didn't.  I was using the exact same php and just
changing what layout I was querying.  
I ran into other problems as well - I am not sure if it is related or
not, but for some reason, my solution "broke" and I was not able to
display data from a related field from a different database.
So, I'm starting fresh - and hopefully I won't run into problems.

Like I said, I'm not so sure that those two problems were related.  I
thought for a while that since the related fields from the other
databases had a different username/password combo, it could have caused
problems.  But, after changing the username and passwords to be equal, I
was still having the problem.

At any rate, I'm going to keep plugging away at this new solution and
hopefully I'll have more luck this time.  
I will keep you posted.

Thanks again for all your hard work.  I really appreciate it.

Alex P. Gates

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Chris Hansen
Sent: Friday, August 25, 2006 12:46 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] only showing 1st image from container field
inforeach loop

Alex,

It seems like I've heard of this problem cropping up before, though I  
don't remember the solution.  That said, have you tested this across  
various platforms and/or browsers?  It seems to me that this could be  
the result of the browser ignoring the GET parameter passed to the  
image, and just displaying the same one repeatedly.  If that were the  
case, I'd assume differing behaviors among browsers.  Let me know  
what you come up with.  Best,

--Chris Hansen
   FileMaker 7 Certified Developer
   Creator of FX.php
   "The best way from FileMaker to the Web."
   www.iViking.org


On Aug 24, 2006, at 1:36 PM, Alex Gates wrote:

> I am having a problem with displaying images from a container  
> field.  It
> will display the 1st one with no problem, but the others aren't making
> the trip.  (I'm using foreach to go through my found set)  When I view
> the source of my page I see that the URL is being made through
> imageproxy, but for some reason, no images besides the one in the  
> first
> record will display.  All the text displays wonderfully - but for some
> reason, only the 1st image comes through.
>
> Have any of you had this problem?
>
> Here is the code for my page - -
>
> <?php
> ob_start();
> ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <?php
> include_once('FX/FX.php');
> include_once('FX/server_data.php');
> include_once('FX/FMErrors.php');
> include_once('FX/image_proxy.php');
> ?>
> <meta http-equiv="Content-Type" content="text/html;  
> charset=iso-8859-1"
> />
> <title>Cookbooks For Sale</title>
> <style type="text/css">
> <!--
> .style6 {
> 	font-family: Arial, Helvetica, sans-serif;
> 	font-size: 10px;
> }
> .style7 {
> 	font-family: Arial, Helvetica, sans-serif;
> 	font-size: 12px;
> }
> body,td,th {
> 	font-family: Arial, Helvetica, sans-serif;
> 	font-size: 11px;
> }
> -->
> </style>
> </head>
> <?php
>
>
>     $lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
> 	$lookup->SetDBData('cbsale.fp7','ToWeb', "all");
> 	$lookup->SetDBPassword("XXXXXXXX",'XXXXXXXXXX');
> 	$lookup->AddDBParam('Status', "Online", 'eq');
> 	$lookupResult=$lookup->FMFind();
> 	$foundResult=$lookupResult['foundCount'];
> 	
> 	echo $foundResult;
> 	echo '<br>';
> 	echo $lookupResult['errorCode'];
>
> ?>
>
>
> <body>
> <table width="608" border="0" align="right" cellpadding="2"
> cellspacing="1" valign="top">
>   <?php
> $i = 0;
> foreach( $lookupResult['data'] as $key => $searchData ){
> ?>
>     <?php
>     if ($i == 0) {
>         print "<tr>\n";
>     }
>     ?>
>     <td width="50" height="186" valign="top">
> <img src="FX/image_proxy.php?FXimage=<? echo
> vignereEncryptURL($searchData['Cover'][0]); ?>" border=1><br />
>     <?php
> 	echo $searchData['CSSForWeb'][0];
> 	?></td>
>
> <?php
>     $i = ($i + 1) % 3;
>     if ($i == 0) {
>         print "</tr>\n";
>     }
> ?>
> <?php
> }
> ?>
> </table>
> </body>
> </html>
>
>
> Thanks for your help - - I'm stumped!
>
> Alex P. Gates
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>

_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list






More information about the FX.php_List mailing list