coldfusion

cApplication settings

In ColdFusion version 9, I have the following in Index.cfm: <cfdump var="#Application#"> But the only thing I'm getting back is a struct with the applicationname - no other variables like rootPath, mappings or customTagPath. Here's what I have in Application.cfc: <cfcomponent output="false"> <cfset this.name = left("App_#hash(getCur...

How do I grab and use a variables coming back through ValueList from an AJAX call?

I'm trying the following code to execute a search and it's not working. On the search.cfm page, the only value coming back is the value I input into the search field (even if I click an autosuggest value, it's not coming back; only the letters I actually type myself come back). <cfform class="titleSearchForm" id="searchForm" action="sea...

Coldfusion CFC creation taking a variable amout of time to execute.

I've been doing some logging of object creation times in our open account process in production. Periodically, initializing an object would take way longer than expected. By initializing I mean calling it's init() and passing a couple of arguments that may be simple variables or objects. e.g. <cfset validateObj = createObject("component...

Is Session Replication ColdFusion 9 still not recomended?

Is seems that Session Replication in ColdFusion servers less that 9 was considered not something to do on high scale apps. Instead the basic path would be to use round-robin and sticky sessions. Is this still the case for CF9 or has Session Replication been improved. ...

Does Len function only evaluate numerical results?

Why does the following code not output "Error" if the form is submitted with a blank field? Does Len only evaluate numerical values? <cfif NOT Len(Trim("Form.myField"))> <cfoutput>Error</cfoutput> </cfif> The following also does not evaluate as expected: <cfif Len(Trim("Form.myField")) IS 0> <cfoutput>Error</cfoutput> </cfif> HTM...

Coldfusion Password Protected RSS Feeds

I'm interested in Password protecting my apps RSS Feeds. So when you load a RSS feed url in the browser the browser's default dialog asks for a login and password. Any tutorials or tips on how to get this to securely work? 37 Signals has this behavior on their web apps. Thanks ...

REGEX to find the value of id="findme" in a html element

Given an HTML string like: <span class="findme" id="31313131313">The Goods</span> What kind of REGEX in Coldfusion would return just (if it's even possible?): 31313131313 Thanks! ...

JQUERY - Find all Elements with Class="X" and then POST all those elements to the server to INS into the DB

Given a large text block from a WYSIWYG like: Lorem ipsum dolor sit amet, <span class="X" id="12">consectetur adipiscing elit</span>. Donec interdum, neque at posuere scelerisque, justo tortor tempus diam, eu hendrerit libero velit sed magna. Morbi laoreet <span class="X" id="13">tincidunt quam in facilisis.</span> Cras lacinia turpis v...

Writing an optimised and efficient search engine with mySQL and ColdFusion

I have a search page with the following scenarios listed below. I was told using so many conditional statements degrades performance, but I don't know if any other way to achieve the same objective. Search.cfm will processes a search made from a search bar present on all pages, with one search input (titleName). If search.cfm is access...

Posting Static & Variable length data to the Server with JQUERY & Coldfusion

I'm looking to post the following type of data to a server using JQUERY & Coldfusion: foodID - int foodDESC - text html text from a WYSIWYG (CKEDITOR) --there will always be just 1 foodID and foodDESC per POST to the server but there can be a variable number of: locationID - int LocationDesc - text --There can be 0-8+ of these. Should...

Given a Date "03/13/2010", using that in a MYSQL Where Clause?

I would like to pass a MYSQL query via Coldfusion the following date: 03/13/2010 So the query filters against it like so: SELECT * FROM myTable WHERE dateAdded before or on 03/13/2010 I'd also like to be able to take 2 dates as ranges, from: 01/11/2000, to: 03/13/2010 SELECT * FROMT myTable WHERE dateAdded is ON or Between 01/11/2000...

JQUERY AJAX, Issues with spaces being sent to the server, Why?

I'm using the following code to post to the server which is then sent to a MYSQL query to find matches via search. $.ajax({ url: '/search/spotlight/', data: "q=" + $(this).val(), success: function(data) { } }); When Q's val has spaces in it, it's creating problems. I'm wondering if I'm handling this correctly? Do I need to encode the ...

Is is possible to run Coldfusion & PHP on the same server and website ?

I would like to be able to port some new site pages over to PHP using the same db as in the coldfusion site. Is it possible to have PHP run pages in say other directory and go back and forth ? Many thanks for your reply. Terry ...

Garbage collecting at ColdFusion CFC

Hello. I have a CFC as singletone object in Application scope. One of the methods is used for massive data processing and periodically causes the "Java heap space" errors. EDIT All variables inside the method are VAR-scoped, so they should not be kept in the object scope when invokation ended. It can be a bit dumb question for Java p...

What is the proper way to assign a general udf to application.cfc?

I simply want to define a function in application.cfc and expose it application wide to all requests. Preferably the "assignment" would only happen on application startup. Is the preferred method to do something along the lines of this: <CFCOMPONENT OUTPUT="FALSE"> <CFSET this.name = "Website"> <CFSET this.clientManagement = true> <CF...

ColdFusion - Sending out a pretty email, mint style

I've used ColdFusion for sending text emails for years. I'm now interested in learning how to send those pretty emails you see from companies like Mint. Anyone know of a good ColdFusion tutorial to teach me how to make this work and not get hit by bugs or spam filters? ...

Difficulty creating a paging function with MySQL and ColdFusion

I'm trying to create pagination for search results using MySQL and ColdFusion. My intention is to only retrieve the queries that can be displayed on a single page, thus making the process efficient. I tried using two queries in my function, but I could not return two variables to the cfinvoke. The following code does not paginate, but ...

can't list files in a directory

I'm using CF 7 and this code is not returning any files: <cfset fileLocation = "\\server\uploader\pass-fail"> <cfdirectory action = "list" directory = fileLocation name = "pass_fail_files" > <cfdump var="#pass_fail_files#" expand="yes" label="files in pass-fail" > <cfoutput>#pass_fail_files.name#</cfoutput> <...

Creating Thumbnails with CFImage Aborting Because of Server Load?

I am uploading in image via a form and I want to, in addition to saving the image, save a variety of thumbnails in both png and jpg format. To do this I am using the code below. The initial image uploads fine but then, after spinning for a moment I get an error of: "Request aborted due to heavy system load." (from my host crystaltech)...

cfoutput looping on one file name

According to LiveDocs for cfoutput in cf7: When you specify a query attribute, this tag loops over the query rows and produces output for each row within the range specified by the startRow and maxRows values I'm trying to grab the names of the files in a directory. I use a cfdirectory to get a query record then query the query wi...