Prab
12-16-2004, 06:34 AM
Hello
I am developing one application in COLDFUSION 5, in which i am storing category names as a comma separated string.
but am showing the values in row wise, my problem is , I want to swap the items.
CatList=Fruits,Flowers,Sweets
<select name="CategoryID" size="15" >
<cfif listlen(CatTitle) gt "0">
<cfloop index="i" list="#CatTitle#" >
<cfoutput>
<option value="#i#">#i#</option></cfoutput>
</cfloop>
</cfif>
<cfif listlen(CatTitle) eq "0">
<option>There are no Categories
</cfif>
My select box will have
==========
Fruits
Flowers
Sweets
if i wanto move sweets to top
now my CatList=Sweets,Fruits,Flowers.
Pls any one can suggest how to achieve this.
Thanks & Regards,
PRab
I am developing one application in COLDFUSION 5, in which i am storing category names as a comma separated string.
but am showing the values in row wise, my problem is , I want to swap the items.
CatList=Fruits,Flowers,Sweets
<select name="CategoryID" size="15" >
<cfif listlen(CatTitle) gt "0">
<cfloop index="i" list="#CatTitle#" >
<cfoutput>
<option value="#i#">#i#</option></cfoutput>
</cfloop>
</cfif>
<cfif listlen(CatTitle) eq "0">
<option>There are no Categories
</cfif>
My select box will have
==========
Fruits
Flowers
Sweets
if i wanto move sweets to top
now my CatList=Sweets,Fruits,Flowers.
Pls any one can suggest how to achieve this.
Thanks & Regards,
PRab



