Menu
  • HOME
  • TAGS

How to create an array in ColdFusion

php,coldfusion,cfml,coldfusion-7

You need to quote the key names also same as you did in the PHP version. The issue that you are hitting is that your key names contain a "minus" character. To workaround this issue you need to quote your keyname. Also in your sample CFML code you will end...

How can I replicate this loop in cfscript (for use in cf10 / railo)

coldfusion,cfml,cfloop

<cfscript> variables.dtNow = now(); variables.dtTmrw = dateAdd('d',1,variables.dtNow); do { variables.dtNow = dateAdd('n',15,variables.dtNow); writeOutput(variables.dtNow); } while(variables.dtNow neq variables.dtTmrw); </cfscript> ...

Unexpected behaviour with accessors=true on a component

coldfusion,cfml,lucee

Without accessors=true, the property declarations are just metadata. With accessors=true, the property declarations trigger the generation of getters / setters and thus a property is both a variables scope item and a pair of methods. In your constructor, you assign to the variables scope items -- which would be the...

What does the ColdFusion framework “fusebox” do exactly?

coldfusion,cfml,fusebox

Fusebox is a Model-View-Controller (MVC) framework for building application with the ColdFusion programming language. However, it is horribly outdated and hasn't been in development for quite some time. I'm surprised that you're being asked to use it for class when there are much more modern MVC frameworks available for ColdFusion....

jquery click not firing

javascript,jquery,cfml

If you are trying to fire an event on a dynamically added element you have to first select an element that already existed that encloses the dynamically added element. This could be a div in which you have appended the new element or you can use the document object if...

Public-private function access via component inheritance in ColdFusion

function,inheritance,coldfusion,encapsulation,cfml

The issue is that you're trying to call the checkValue() method as a public method. this does not work in CFML the same way as it does in other languages (a very poor design decision on the part of Macromedia): this is an external reference to the object itself, so...

CFML issue with date mask

coldfusion,cfml

DateFormat does not have time pattern. Requested result can be obtained using DateFormat and TimeFormat functions. <cfset result = DateFormat(variables.fl_dt, "yyyy.MM.dd") & " at " & TimeFormat(variables.fl_dt, "HH:nn:ss") /> ...

Lucee array.each return value

cfml,lucee

You need to look slightly closer at the code in your first example: public function getLineItemDetailsById(required numeric id){ // first function this.LineArray.each(function(i){ // second function if(i.Id == id){ return i; // return for second function } }); // no return from first function } I have annotated it slightly to...

Decoding Base64 to an Image in ColdFusion

javascript,coldfusion,cfml,topaz-signatures

As your binary data doesn't have image headers(Contains Mime type e.g. data:image/png;base64 for png image) so you can simply use imageReadBase64 like this: <cfset image = imageReadBase64(form.SigImgData)> <cfimage source="#image#" destination="c:\Inetpub\wwwroot\signatures\#fullfilename#.bmp" action="write"> I tried it locally with same code. Is this your image? ...

Fusebox cannot identify the controller

coldfusion,cfml,railo,cfc,fusebox

This may be caused by a conflict between a UDF in Fusebox and a built-in function with the same name in Railo/Lucee. Try searching the entire Fusebox folder for getCanonicalPath and replacing each occurrence with getCanonicalPathUdf....

Login failed for user 'sa' while trying to create datasource with Railo

sql-server,sql-server-2012,railo,cfml

After Leigh mentioned in the comments to look at my logs it had the following message: "Login failed for user 'max'. Reason: Failed to open the explicitly specified database 'test'. [CLIENT: 127.0.0.1]" I then tried to make a connection without mentioning a database and that worked....

How to add twitter and facebook login using ColdFusion? [closed]

oauth,coldfusion,cfml

What is your problem with the integration? There are no tables to be needed. Check out this post http://www.raymondcamden.com/2014/1/28/Updated-ColdFusion-OAuth-Code Or simply Google "ColdFusion OAuth 2.0" since that is what both Facebook and Twitter use. ColdFusion 11 also added some features with the <cfoauth> tag, some more info here: http://www.adobe.com/devnet/coldfusion/articles/social-integration.html...

Coldfusion 9 serializeJSON()

json,coldfusion,adobe,coldfusion-9,cfml

You can disable this in the ColdFusion administrator. Go to Server Settings > Settings and uncheck Prefix serialized JSON with There are, however, security implications if you turn this off. This helps protect your JSON data from cross-site scripting attacks and is explained more in depth in this StackOverflow answer...

How to skip unsupported image using cfimage processing?

coldfusion,coldfusion-10,cfml

Try using this function for reading images. CFimage tag or imageNew() can have issues while trying to read image files which are corrupted or files saved with changed extensions (background transparent .png files saved as .jpeg) while uploading. I think the main problem with these files is that there is...

Cfscript and dynamic values

java,coldfusion,coldfusion-10,cfml

You may reference the variables via the URL scope in CF. You may want to wrap the values with JavaCast() and cast the value into the right type, just in case.

Displaying CFQuery Result Over Time Span

coldfusion,coldfusion-9,cfml

I usually put a garbage value before starting a loop. <cfset CompareValue = "value that will never occur in real life"> <cfloop> <cfif FieldToCheck is not CompareValue> <cfset CompareValue = FieldToCheck> more code <cfelse> appropriate code, maybe nothing </cfif> </cfloop> ...

Banner rotator tied to the Application scope instead of database?

mysql,coldfusion,cfml

It's good that you're trying to think outside the box. Sometimes what is easiest is not what is best. Like Matt Busche said, I don't think the weight of 2k queries per hour (2 every 3.6~ seconds) is a large concern but I wanted to focus on something you said...

Capitalize first letter of first word in a every sentence in ColdFusion

regex,coldfusion,railo,cfml

Take your text and set it to a variable like this: <cfset stringfixer = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUR ADIPISCING ELIT. DONEC TEMPOR PULVINAR ENIM! NEC ALIQUAM MASSA FAUCIBUS SED?? PRAESENT NEC CONSECTETUR SAPIEN... NULLA DAPIBUS RUTRUM TURPIS, AC PORTA ERAT POSUERE VEL."> Lowercase everything: <cfset stringFixer = lcase(stringFixer)>...

Railo web.cfm showing IIS 404

coldfusion,railo,cfml

Bypass IIS and hit tomcat directly. IE, from the local machine: http://127.0.0.1:8888/index.cfm or http://127.0.0.1:8888/railo-context/admin/server.cfm ...

Populate a