
Graphical numbers replacing a number count
I am pulling a total number of records from a database and then want to display this number as a graphic (i.e. I plan to make nice, pretty number 09 and want to take whatever value from the count and then convert it to display the <img src> HTML links for the appropriate numbers)  anyone have an idea how to approach this?

RE: Graphical numbers replacing a number count
Something like this would work...although it may not be the most efficient way.<BR><BR>get the number of records returned to start (obviously).<BR>find out the length (eg: if there are 100 records, the length is 3)<BR>Then just step through whatever the value of length is and stuff each number into an array so that the result would end up array[1,0,0] then just use a do while loop or whatever method you prefer and put your img src=array[i] values in.

RE: Graphical numbers replacing a number count
<<<Then just step through whatever the value of length is and stuff each number into an array>>><BR><BR>Can you expound on that a bit?

RE: Graphical numbers replacing a number count
Sorry, I was trying to be as brief as possible since I am currently doing some work.<BR><BR>basically something like this:<BR>rs.Open sql,ConnectionObject<BR><BR>RecordCount = RecordSet.RecordCount<BR>lengthOfRecordCount = Len(RecordCount)<BR>dim myArray(lengthofRecordCount  1)<BR>'insert your own code to stuff the array with values from <BR>'recordSet<BR>i = 0<BR>Do While i < lengthOfRecordCount  <BR> imgStr = imgStr & "<IMG SRC='" & myArray(i) & ".gif'"<BR> i = i + 1<BR>Loop<BR><BR>This code is terrible due to the hasty write but you should get the idea.

RE: Graphical numbers replacing a number count
Thanks for the help Anon, I'm afraid i'm still too basic to be able to figure this one out  is there anyone out there not working :) that can write the code for me so I can have it (and study it)?

RE: Graphical numbers replacing a number count
Here, this is just a quick and dirty way to give you an idea. You can be better but it will at least get you going.<BR><BR>length = Len(RecordCount)<BR>i = 1<BR>Do While i <= CInt(length) <BR> Response.Write "<IMG SRC='" & Left(RecordCount,1) & ".gif'>"<BR> RecordCount = Right(RecordCount,length  i)<BR> i = i + 1<BR>Loop<BR>
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

