v8superkid
Starting Member
Australia
26 Posts |
Posted - 29 January 2005 : 01:41:39
|
I'm creating a photo gallery for my website using a Access Database. The database is fine and i can get results up on the asp page using VBScript. I have 6 photos at the moment. But what i want to do is have 4 pictures per row and not sure how many rows i will want before it goes to another page. But at the moment the 6 pictures are all following each other down the page. Does anyone know what VBScript code would do what i want?
Atm i'm using
.Write " <center>" & vbNewLine .Write " <table width='*' align='center' border='0' cellpadding='0' cellspacing='0'>" & vbNewLine .Write " <tr>" & vbNewLine .Write " <td width='*' colspan='4'><div align='left'><font size='1'><strong>Picture Gallery</strong></font></div></td>" & vbNewLine .Write " </td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " </table>" & vbNewLine While Not Rs.Eof If I MOD 2 = 1 Then .Write " <table width='100%' border='0' cellspacing='0' cellpadding='0'>" & vbNewLine End If .Write " <tr>" & vbNewLine .Write " <td>" & vbNewLine .Write " <table width='*' border='1' cellspacing='2' cellpadding='2'>" & vbNewLine .Write " <tr>" & vbNewLine .Write " <td width='*' class='table'><div align='center'><font size='2'><IMG SRC='photos/thumbnails/IMG_" & Rs("IMG") & ".jpg'></div></font></td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " <tr>" & vbNewLine .Write " <td width='*' class='table'><font size='2'><div align='center'>" & Rs("dname") & "</div></font></td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " <tr>" & vbNewLine .Write " <td width='*' class='table'><font size='2'><div align='center'>" & Rs("tname") & "</div></font></td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " <tr>" & vbNewLine .Write " <td width='*' class='table'><font size='2'><div align='center'>" & Rs("carmodel") & "</div></font></td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " <tr>" & vbNewline .Write " <td width='*' class='table'><font size='2'><div align=çenter'>" & Rs("track") & " " & Rs("year") & "</div></font></td>" & vbNewLine .Write " </tr>" & vbNewLine .Write " </table>" & vbNewLine Rs.Movenext I = I + 1 Wend .Write " </tr>" & vbNewLine .Write " </td>" & vbNewLine .Write "</td>" & vbNewLine .Write "</table>" & vbNewLine .Write "<p align='center'><a href='javascript:history.go(-1)'><strong>BACK TO PREVIOUS PAGE</strong></a></p>" & vbNewLine .Write "</center>" & vbNewLine End With End If
And the display page is http://www.asmmotorsport.com/asmproductions/photos.asp?category=1&year=1&track=1
Any help would be greatly appreciated |
|