Implode function with full javascript loop
I'm creating a Photo Gallery, but I want the thumbnails created in a table, 3 per row.
I've set up a column to create the table, and find the appropriate photos, I just can't create rows.
I want to do something like this:
(y is hard coded to 10, but will be replaced by the number of attachments.)
doc:=@Implode("[<script type=\"text/javascript\">
var y=10;z = y;
for (i=0;i<y;i++){
if(z % 3 == 1)
{document.write(\"<tr>\");
document.write(\"<TD vAlign=\"top\" width=\"113\"><font face=\"Arial\" size=\"2\"><p><a href=\"" + ViewURL + "\"><img src=\"" + "/"+DatabaseURL+"/"+ DocumentURL+"/$File/" + @AttachmentNames + "\""+ " width=\"100\"></a><br>" + @AttachmentNames + "</p></td>);
z--;
}
else
{document.write(\"<TD vAlign=\"top\" width=\"113\"><font face=\"Arial\" size=\"2\"><p><a href=\"" + ViewURL + "\"><img src=\"" + "/"+DatabaseURL+"/"+ DocumentURL+"/$File/" + @AttachmentNames + "\""+ " width=\"100\"></a><br>" + @AttachmentNames + "</p></td>}}</script>]");
doc
Any help would be great...
Cheers
-mrg.



