Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 VBScript Loops and other Code Help Needed
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

v8superkid
Starting Member

Australia
26 Posts

Posted - 29 January 2005 :  01:41:39  Show Profile  Visit v8superkid's Homepage  Send v8superkid an AOL message  Send v8superkid an ICQ Message  Send v8superkid a Yahoo! Message
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
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07