how to count loop with grpahic numbers

# Thread: how to count loop with grpahic numbers

1. Senior Member
Join Date
Dec 1969
Posts
422

## how to count loop with grpahic numbers

ok, I&#039;ve got a list that was generated from my DB,<BR>the list loops to show the top 10 entries by number of votes.<BR><BR>and I would like to number each entry from 1-10 but with little graphical .gif numbers that I made,<BR><BR>and I have no idea how?<BR>could some one show me an example or explain how to do this?<BR>this is that I&#039;ve got so far: http://test.zrcweb.com/zrc/top10/index.asp<BR><BR>thanks in advance for your help!:-)

2. Senior Member
Join Date
Dec 1969
Posts
11,334

## RE: how to count loop with grpahic numbers

Wherever you&#039;re writing them to the page, just insert the image instead of the number.

3. Member
Join Date
Dec 1969
Posts
45

## RE: how to count loop with grpahic numbers

Name your gif&#039;s "1.gif", "2.gif", etc...<BR><BR>Assuming you&#039;re using a for next loop to increment from 1 to 10:<BR><BR>For q = 1 to 10<BR>&#039;whatever code for your table row<BR>&#060;img src="&#060;%=q%&#062;.gif"&#062;<BR>&#039;the rest of your table row code<BR>Next<BR>

4. Senior Member
Join Date
Dec 1969
Posts
1,424

## RE: how to count loop with grpahic numbers

It shouldn&#039;t be too hard. If you&#039;ve already got your 10 .gifs called 1.gif.... through to 10.gif, then you simply do something like:<BR><BR>For i = 1 To 10<BR> Response.Write "&#060;img src=" & i & ".gif /&#062;"<BR> Response.Write "Artist #" & i & ": " & rst( "ArtistName" )<BR>Next

5. Senior Member
Join Date
Dec 1969
Posts
422

## RE: how to count loop with grpahic numbers

yes, but all the info is coming from a loop, and I want to show a different # and each entry,<BR>and if I did it like your saying it would show the same number all the way down the list.

6. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## Just increment a counter.

Dim count<BR> count = 0<BR><BR>Do While Not oRs.EOF<BR> count = count + 1<BR>Loop

7. Senior Member
Join Date
Dec 1969
Posts
422

## RE: how to count loop with grpahic numbers

hmm,,ok I did that, but for some reason, they&#039;re all showing 11.gif ??<BR>here&#039;s my script:<BR>http://test.zrcweb.com/zrc/top10/index.asp

8. Senior Member
Join Date
Dec 1969
Posts
1,570

plus show your code, b/c the example given should work fine!!

9. Senior Member
Join Date
Dec 1969
Posts
422

## RE: Just increment a counter.

hmm,, not sure how to make it work like that.<BR>this is what I&#039;ve got so far: http://test.zrcweb.com/zrc/top10/index.asp

10. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## I can't see your code.

Just what it outputs.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•