I’m using ColdFusion to return a result set from a SQL database and turn it into a list.
I need some way to generate an alphabetical navigation bar for that list. I have ColdFusion and the jQuery library available.
I’m looking to generate something like this:
A | B | C | ... - A - A - B - B - B - C - D
Where clicking on one of the letters drops you down the page to the first item for that letter. Not all 26 letters of the alphabet are necessarily in use.
So, there were plenty of good suggestions, but none did exactly what I wanted. Fortunately I was able to use them to figure out what I really wanted to do. The only thing the following doesn’t do is print the last few unused letters (if there are any). That’s why I have that cfif statement checking for ‘W’ as that’s the last letter I use, otherwise it should check for Z.