coldfusion

How to get the name of the current folder, not the dir to the folder

 ̄綄美尐妖づ 提交于 2019-12-23 04:48:08
问题 I know how to get the dir to the folder, but I'd like to get the name. Thank you for your help. 回答1: A slightly more efficient method for doing what @Matt Shooks suggests would be to use list functions directly, rather than to convert to an array (since you only need to reference it once). fullpath = getDirectoryFromPath(getCurrentTemplatePath()) assuming that you are on Windows, and your fullpath looks something like c:\inetpub\site\dir, you can use this: thisFolder = listlast(fullpath, "\/"

Return data using ColdFusion and jQuery Ajax

可紊 提交于 2019-12-23 03:54:15
问题 I'm making a request to a cfc file that queries a database. Do I store these results in a struct, array or some other way? And depending on how I store and return the results, how do I handle the pieces from jQuery? I tried storing the results in an array and only displaying one of the results like so, which did not work: $.ajax({ type: "POST", url: "/ajax/ajax_test.cfc?method=ajaxTest", data:"field1=17", success: function(response) { var r=response; $(".cat_vid_subContainer").empty(); $("

Difficulty parsing string with Facebook one click sign on and ColdFusion

[亡魂溺海] 提交于 2019-12-23 03:51:50
问题 I am using using ColdFusion 9.0.1 I am building a site that will use Facebook connections extensively, so we need the Facebook one click sign on. Specifically, to vote on our site, visitors will just "log in with Facebook" and can do all sorts of cools things while we track what they do using their email address. I am only slightly confused by the Facebook documentation. And with their recent security change, most of the tutorials and help files I find elsewhere are out of date. So.... I have

Difficulty parsing string with Facebook one click sign on and ColdFusion

烈酒焚心 提交于 2019-12-23 03:51:32
问题 I am using using ColdFusion 9.0.1 I am building a site that will use Facebook connections extensively, so we need the Facebook one click sign on. Specifically, to vote on our site, visitors will just "log in with Facebook" and can do all sorts of cools things while we track what they do using their email address. I am only slightly confused by the Facebook documentation. And with their recent security change, most of the tutorials and help files I find elsewhere are out of date. So.... I have

Coldfusion Encryption/Decryption issue

ぐ巨炮叔叔 提交于 2019-12-23 02:36:42
问题 I recently did a website for my company using ColdFusion 9. The issue I am having is with the ColdFusion encryption/decryption function. On certain strings that I decrypt I get these weird special characters that show up. Example: MK/_0 <---Encrypted String Outputted �#5&z <---Decrypted String Outputted I'm not sure why this is happening (and only on certain strings that get decrypted). Here is the code: <cfset ccNum = decrypt(getCCInfo.CUST_CARDNUMBER,myKey)> 回答1: Ok, well first, I have to

Get contents of brackets using regex in a list of values

孤街醉人 提交于 2019-12-23 01:55:09
问题 I'm trying to look for a regex (Coldfusion or Java) that can get me the contents between the brackets for each (param \d+) without fail. I've tried dozens of different types of regexes and the closest one I got is this one: \(param \d+\) = \[(type='[^']*', class='[^']*', value='(?:[^']|'')*', sqltype='[^']*')\] Which would be perfect, if the string that I get back from CF escaped single quotes from the value parameter. But it doesn't so it fails miserably. Going the route of a negative

$.ajax ColdFusion cfc JSON Hello World

懵懂的女人 提交于 2019-12-23 01:44:05
问题 I've simplified this example as much as I can. I have a remote function: <cfcomponent output="false"> <cffunction name="Read" access="remote" output="false"> <cfset var local = {}> <cfquery name="local.qry" datasource="myDatasource"> SELECT PersonID,FirstName,LastName FROM Person </cfquery> <cfreturn local.qry> </cffunction> </cfcomponent> And using the jQuery $.ajax method, I would like to make an unordered list of everyone. <!DOCTYPE HTML> <html> <head> <script src="http://www.google.com

C# and ColdFusion AES Encryption not matching

自作多情 提交于 2019-12-23 01:43:26
问题 I have to encrypt url query sting in C# and pass to ColdFusion page. Can someone help me on writing encryption code using AES algorithm in C#.net that is equivalent to below ColdFusion function? Thanks in advance. <cfset strLink = Encrypt("top secret", "WTq8zYcZfaWVvMncigHqwQ==", "AES","Hex")> CF Result: strLink = 91E72250B8A7EDBC4E5AF37F04E6AB5B I tried below code in C#, but the results are not matching. byte[] plainText = Encoding.Unicode.GetBytes("top secret"); byte[] key = Convert

JSOUP - How to get list of disallowed tags found in html?

烈酒焚心 提交于 2019-12-23 01:12:20
问题 I use JSoup to secure rich text areas against harmful code. How do I get a list of all the disallowed tag/code found in the string passed to JSoup's parse, clean or isValid functions? I use ColdFusion and can parse the text with JSoup like this: var jsoupDocument = application.jsoup.parse( this.Description ); How do I get a list with JSoup 's getErrors() function to see which HTML does not comply to my whitelist.relaxed() ? 回答1: I don't believe there's a direct function in jsoup to get a list

Receiving an uploaded file in a Coldfusion CFC

好久不见. 提交于 2019-12-22 18:38:19
问题 I have a Backbone front-end that is sending restful calls with an uploaded file to a Coldfusion backend. I need to know how to 'get at' the file once it has reached my CFC. Unfortunately i have some doubt as to whether the file is being sent at all, my POST goes off fine and returns a basic string from the CFC so i know that is working. The POST payload looks like this ------WebKitFormBoundarymjCH1xJJ2D10ncj8 Content-Disposition: form-data; name="qqfile"; filename="Jellyfish.jpg" Content-Type