Gregory's Blog

Data types may be different between ColdFusion and jQuery.

I developed code that gets and sets theme settings from a .ini file. I am using getProfileString and setProfile string to set the various theme properties in a ColdFusion component on the server side. Depending upon the approach that I use, the datatypes that are being returned to the client are different. For example, if I invoke the function from a .cfm page, the values that I am getting are stored in strings, and are being returned as either a 'yes' or 'no'. However, if I invoke the same function from ajax, the value is being returned as a boolean value, i.e. true or false. The component and the method are the same, but the evaluation of the return value is different between ColdFusion and jQuery. Be aware that if you don't declare and set the datatype of the structure elements independently; the datatypes can be interpreted differently depending upon where they are being evaluated.

This entry was posted on May 18, 2019 at 5:13 PM and has received 31 views.

There are currently 0 comments.




Your input and contributions are welcomed!

If you have an idea, BlogCfc based code, or a theme that you have built using this site that you want to share, please contribute by making a post here or share it by contacting us! This community can only thrive if we continue to work together.

Images and Photography:

Gregory Alexander either owns the copyright, or has the rights to use, all images and photographs on the site. If an image is not part of the "Gregory's Blog" open sourced distribution package, and instead is part of a personal blog post or a comment, please contact us and the author of the post or comment to obtain permission if you would like to use a personal image or photograph found on this site.

Credits:

Portions of Gregory's Blog are powered on the server side by BlogCfc, an open source blog developed by Raymond Camden. Revitalizing BlogCfc was a part of my orginal inspiration that prompted me to design this site. Some of the major open source contributers to BlogCfc include:

  1. Peter Farrell: the author of 'Lyla Captcha' that is used on this blog.
  2. Pete Freitag: the author of the 'ColdFish' code formatter that is also used on this blog.

Version:

Gregory's Blog Version 1.01 June 13, 2019 00:49 PST.