Hmm... how about using a conditional loop with Mid() ...

<CFOUTPUT>

    <CFSET index=1>

        <CFLOOP condition="len(counterstring) LTE index">

            <CFSET image = "#Mid(counterstring, index, 1)#">

                <img src="#image#.gif" border=0 hspace=0 vspace=0>

            <CFSET index= #evaluate(index+1)#>

        </CFLOOP>

</CFOUTPUT>


This assumes a naming convention of "1.gif","2.gif", etc... you probably
will want to put a borderless table around the <img> tag so you can better
control the spacing, but that's the basic idea.

If I goofed on the syntax, someone please correct, thanks :-)

bill.
----- Original Message -----
From: "Rob Matlow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 1:17 PM
Subject: RE: [CFTALKTor] Breaking down a number


> Try using the right or left function.  You can then obtain the number for
> each of the four digits.
>
> Rob
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Chad Bohnert
> Sent: March 19, 2002 1:17 PM
> To: [EMAIL PROTECTED]
> Subject: [CFTALKTor] Breaking down a number
>
>
> I have a hit counter that is returning the number of pages views.  I want
to
> take the number that is returned and convert it in to a graphic.  So what
I
> am trying to find out is a way to take a number like 1234 and break it
down
> in to 4 parts, keeping the order.  That way with if statements I can plug
in
> graphics for the numbers.
>
> Any Ideas?
>
>
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: "Chad Bohnert" <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>
>
>
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: "Rob Matlow"
<[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Bill Sourour" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to