Ug.hate having to manipulate data like that. This sounds like the solution I may
have to use for another problem, which is that javascript strips off any leading zeros from data. I have passwords that lead with a "0", so I've got to do something about that. Over on the cf-talk list, it was suggested that I use the YesNoFormat function, but can't since I'm outputting the data using javascript. Is there no js formatting option available? I googled for a solution before posting, but couldn't find anything very helpful. didn't good for your words, however. Seems like the js language would have a solution for this on the output side. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 2:55 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data "Yes" or "No" in output... I do CF dev work, too, but haven't come across this yet, but it made me curious. I googled "coldfusion yes no serialize json" and it brought up a few articles about this. Sounds like adding a space after "yes " and "no " is the workaround some other people used. Ooof. - Jack Rick Faircloth wrote: Thanks for the perspective, Jack. I just used firebug to check the json values being returned in the query (ColdFusion) and, indeed, the data is "true" and "false" instead of "yes" and "no". I'll have to work something up server-side. Maybe it's the json formatting that's doing it. I have set ColdFusion to return the data to the calling page in json. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Friday, August 07, 2009 1:09 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to maintain data "Yes" or "No" in output... If the values are truly the words Yes and No in the db, then it's probably the library you're using on the server side to prepare the data for returning for the ajax call. Check the output of that. If that's still showing the words, it seems odd that they would transform again on their way to the browser, but maybe just make sure they have quotes around them (again, seems unlikely). - Jack Rick Faircloth wrote: I've got a MySQL db that contains "Yes" or "No" in char datafields. When I use $.ajax to bring that into the DOM and output the data via ' + row[12] + ', for example, the values are converted to "true" or "false" when output on the screen. What's the best method of getting "Yes" or "No" as the output instead of "true" or "false?" Thanks for any suggestions! Rick ---------------------------------------------------------------------------- ------------------------------------------ "Ninety percent of the politicians give the other ten percent a bad reputation." - Henry Kissinger