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...
<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> ...
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...
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....
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...
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...
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") /> ...
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...
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? ...
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....
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....
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...
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...
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...
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.
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> ...
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...
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)>...
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 ...
You're close (and good on you for using custom tags, btw). You need to tell CF you want the column value from the query, not just the value of the passed-in attribute. So it'd be this: <cfoutput query="option_query"> <option value="#option_query[Attributes.option_value_source][currentRow]#"> #option_query[Attributes.option_inner_source][currentRow]# </option> </cfoutput> One can only use a direct reference...
Something like this should get you started. sqlString = "select * from users where 1 = 1 "; if ( len(trim((arguments.userUID)) > 0 ) sqlString &= " AND userUID = :userUID"; etc get.setSQL(sqlString); Note that with this answer the query will return the entire table if no arguments are provided....
coldfusion,coldfusion-9,cfml,qoq
You can use a GROUP BY option instead and use the ID row from the spreadsheet query <cfquery dbtype="query" name="qDistinct"> SELECT col_1 , col_2 , min(ID) AS firstID FROM qSheet GROUP BY col_1 , col_2 ORDER BY firstID ...
You can't use "==" as a decision operator with tags. Use "EQ". Try... <cfset variables.test = 3> <cfset variables.check = variables.test EQ 5> <cfdump var="#variables#"> Doc reference: "The CFScript language: Expressions and operators"...
Thanks all, particularly EJK and Mark A Kruger: I solve:<cfoutput>#Request.data#</cfoutput> ...
sql,database,coldfusion,coldfusion-9,cfml
Why over complicate things? <cfif NDA_check eq "Y"> sel_prod_dt = "select distinct change_app_code, change_number FROM db.tb tb" <cfelse> sel_prod_dt = "select distinct change_app_code, change_number FROM db.tb2 PC" </cfif> ...
Often in this case, I find solace in visualizing my data. Thanks to ColdFusion, it's simple. Directly after your call to DeserializeJSON, dump the data so you can see it. <cfdump var="#ParcelJSON2#"> At this point you'll see a nicely formatted ColdFusion dump of data that you can get, output and...
You cannot use CFML within JavaScript per-se because ColdFusion runs on a server and JavaScript runs on the client. However, you need to consider how CFML works, the CFML code is processed on the server and then the output is passed on to the client. So in your case, the...
coldfusion,timeout,coldfusion-9,coldfusion-10,cfml
Ultimately, you need to have code on your server to prevent processing the link multiple times from the same user. However, to solve the UI issue, have you link call a function instead of the cf file directly. <a class="msg" href="javascript: processLink(#destination#);"> #ucase(request.l('Send'))# </a> <script> runCount = 0; function processLink(destination){...