May 12, 200322 yr Is it possible to format your results so that you can have your results pull up in 2 columns ? I am working on a photo database. my search page pulls up small thumbnail photos. I would like the results to pull up rows of photos instead of each row with just one photo. Is that possible and if so could you share the code with me. (I am a newbie, and don't know too much yet). Thanks for your help !
May 12, 200322 yr maybe...: <td height="20"> [FMP-Record] [FMP-field: FieldName] .:. [/FMP-Record] </td> where you would have one table(html)row, and all the data-filed-images in that row but I would imagine this to be hard to control design-wise give it try...
May 12, 200322 yr Here you go: <table><tr> <script>i = 1 ; nCols = 2 ; [FMP-Record] if ((i % nCols) == 0) { document.write("<td>[FMP-Field:myimage]<br>[FMP-Field:imagename]</td></tr><tr>") ; } else { document.write("<td>[FMP-Field:myimage]<br>[FMP-Field:imagename]</td>") ; } ; i++ ;[/FMP-Record] </script></tr></table> All the best. Garry
May 13, 200322 yr Author thanks, for the help. I couldn't get it to work with my database. I think it may be because the way I linked my pictures from the database. I put thumbnail photos inside the database which on the results page link to a detail page which has a field which has the URL to link to larger photos. I imagine there is a better way to do this. I just tried different things until I got it to work. I will try to attach my database. Can you take a look ?
May 13, 200322 yr I'm travelling for the next few days, so I will be able to check it out on the weekend. All the best. Garry
May 18, 200322 yr Try this: <TR> <script>i = 1 ; nCols = 2 ; [FMP-Record] if ((i % nCols) == 0) { document.write("<td width='156' valign='top'><img src='[FMP-Image:Photo]' border='1'></td>"); document.write("<td>[FMP-FIELD: picname]<br>Type: [FMP-FIELD: pictype]<br>Category: [FMP-FIELD: category]<br></td></tr><tr>"); } else { document.write("<td width='156' valign='top'><img src='[FMP-Image:Photo]' border='1'></td>"); document.write("<td>[FMP-FIELD: picname]<br>Type: [FMP-FIELD: pictype]<br>Category: [FMP-FIELD: category]<br></td>"); }; i++ ;[/FMP-Record] </script> </tr> <!-- <TD ALIGN=center VALIGN=top colspan="2"> </TD> <TD WIDTH=156 ALIGN=center VALIGN=top> <div align="left"><a href="[FMP-linkrecid: layout=detail, Format=pdetail.htm]"><img src="[FMP-Image:Photo]" border="1"></a></div></TD> <TD width="241" VALIGN=top class=caltext> <p><span class="formtypeplain">Name: [FMP-FIELD: picname]<br> Type: [FMP-FIELD: pictype]<br> Category: [FMP-FIELD: category]<br> Subject : [FMP-FIELD: subject]<br> </span><br> <a href="[FMP-linkrecid: layout=detail, Format=pdetail.htm]">[bigger Image]</a> </p> <p></p></TD> <TD width="235" VALIGN=top class=caltext> <p> </p></TD> </TR> <TR> <TD ALIGN=center VALIGN=top colspan="5"> </TD> </TR> [/FMP-RECORD] --> </TABLE> This works fine. (Needs some more formatting though!) You can change the variable nCols to vary the number of columns. All the best. Garry
Create an account or sign in to comment