On Wednesday, January 29, 2003, at 03:13  PM, Brad Roberts wrote:

> I've got a structure that holds several questions:
>
>   temp = structNew();
>   temp.A = "a quesiton";
>   temp.B = "another question";
>   temp.C = "yet another question";
>   ... and so on
>
> I'm outputing the questions like so:
>
>   <cfloop collection="#temp#" item="q">
>     #temp[q]#: <input type="checkbox" name="#q#" value="1" /><br />
>   </cfloop>
>
> For some reason, the questions won't stay in order on the production 
> server.
> They do fine on my dev machine.  I've tried structSort(), but can't 
> get it
> to work...
>
> Any suggestions?

<cfset keyList = listsort(structkeyList(temp),"text")/>
<cfloop list="#keyList#" index="q">
        #temp[q]#: <input type="checkbox" name="#q#" value="1" /><br />
</cfloop>

I'm guessing you are running MX in production, but not in dev. The 
ordering of structs changed from 5.0 to MX. There seems to be no rhyme 
or reason to the output order in MX. Fun.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to