Charlie and Brad...you've both come to the same solution
with the YesNoFormat() function, however, I don't see where
I can implement that. (I'm just probably brain-fried from
dealing with jquery, json, ajax, and CF..and to think I *just*
got back from vacation! No good!)
Anyway, I'm outputting the data in the DOM via javascript, as in:
out.push('<div>' + row[5] + '</div>');
so I don't have a chance to use the YesNoFormat function there.
Do I need a client-side, js formatting solution in this case?
(I asked about this on the jQuery list, thinking that it would
need to be a client-side formatting solution, but it was suggested
I look for a server-side solution....around we go...)
Rick
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Friday, August 07, 2009 2:45 PM
To: cf-talk
Subject: RE: How to prevent JSON data "Yes" and "No" being returned to
calling page as "true" and "false"...
Yes, the JSON formatting tries to guess the data type for you. This can
be especially frustrating if you have numbers with significant leading
zeros like zip codes.
Sometimes you can add spaces to the data to trick CF. If I were you, I
wouldn't worry about the true/false conversion and just use the
yesNoFormat() function built into CF to turn them back into the words
yes and no.
~Brad
-------- Original Message --------
Subject: How to prevent JSON data "Yes" and "No" being returned to
calling page as "true" and "false"...
From: "Rick Faircloth" <[email protected]>
Date: Fri, August 07, 2009 1:39 pm
To: cf-talk <[email protected]>
Long subject line.
I've got char datatypes in a MySQL 5 db with data of "Yes" and "No".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325287
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4