In each iteration of  loop, compare the first letter with the first
letter in the last iteration of the loop. If they are different, write
the anchor.

E.g.

Loop 20, first letter is c; loop 21, first letter is c, don't write an
anchor; loop 22, first letter is d, write the anchor out now.

On 5/3/07, Scott Stewart wrote:
> Trying to dynamically insert anchors.
> I have an alpha list each letter has an href <a href="#A">A</a>, etc.
> It's supposed to correspond to a list of links below it (which is generated
> by looping over an array)
> If I just insert an anchor above the name I can give each link an anchor,
> but.
> What I need is one anchor before the A's, one before the B's etc.


-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276872
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to