coldfusion

Sending ampersand in GET

I have a drop box which is populated by information from a database. Some of the items have ampersands in them. When the drop box is changed, there is some ajax done, and this includes sending the info from the drop box in a GET. An ampersand in the name of the item from the drop box messes up the URL for the GET. For example, here is a...

Creating a JS function to send boolean to Coldfusion Filter Funtion?

Is it possible to send a javascript function to test if a form field was changed then pass a boolean (bCheckField) to a filter function that will tell it to actually perform the check or to skip over the validation and continue? If so, how should I approach this? Utilizing Coldfusion 8, MachII and Microsoft SQL. Thank you very much... ...

Pass a JS boolean when changing text in a input field?

How do I pass a JS boolean to hidden CFINPUT field when a user has edited text in a specific input text field? ...

validate.cfc Regular expression help for email

I'm using the excellent validate CFC by Ryan J. Heldt http://validation.riaforge.org/ but have a problem with the email validation RE. RFC 5322 allows the following characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~ however the RE in validate.cfc rejects JohnO'[email protected] because of the apostrophe. The RE in question is in ...

Translate PHP PUT HTTP request to ColdFusion

What would this code look like in ColdFusion? protected function httpPut($url, $params = null, $data = null) { $fh = fopen('php://memory', 'rw'); fwrite($fh, $data); rewind($fh); $ch = curl_init($url); $this->addOAuthHeaders($ch, $url, $params['oauth']); curl_setopt($ch, CURLOPT_PUT, 1); cu...

ColdFusion - Prevention - Cross-site request forgeries (CSRF)

Hello, I'm interested in learning how to prevent Cross-site request forgeries (CSRF) in my ColdFusion 9 application. I found a few tutorials online but none seem to be comprehensive. The best I've found is: http://www.mollerus.net/tom/blog/2009/01/an_easy_block_for_crosssite_request_forgeries_csrf.html But that's not a incredibly compreh...

coldfusion weird extra space

Hi All, I have a function to convert string to number <cffunction name="convertToNumber" returntype="numeric"> <cfargument name="separator" required="Yes" type="string" /> <cfargument name="number" required="Yes" type="string" /> <cfset LOCAL.arrSeparator = ["comma", "period", "lakh_crore"] /> <cfif ARGUMENTS.separato...

Why is my cfgrid outputting true/false instead of the words yes/no

I am working on some code that previously was using a cfquery, and is now using bind to a cfc to get the data. When it was using the query, the column 'workcomplete' showed yes/no (These are the values saved in the database as text). Now that it is using bind, that column is showing true/false instead of yes/no. They match, ie, if the da...

Server-Side callback function to solve JS-CF execution order dependency?

I would like to call a form as pop-up window (a form with some input fields and a submit button) and then read the user selected results from the session. The problem is that the mixing of JS code (pop-up window) with CF (server-side) code, as is expected, causes the process to output the session variable before the process updates it. F...

Cross domain AJAX with Basic Authentication?

I have a ColdFusion application that's behind an ISA Server. Part of the application is protected by Basic Authentication and part is not. ISA Server sets a cookie when the user logs in, but the cookie is only available for reading when I bypass ISA. So, the cookie cannot be read from the server where the application is running. I'm tr...

Creating a Word document in Coldfusion - how to have pagenumbering?

I am creating a Word format .doc using the following code, then cfheader and cfcontent to serve. All is good but I need to be able to place dynamic information in the header (or footer), or automatic pagenumbering would be a second best option. How should I modify the code? <cfsavecontent variable="myDocument"> <html xmlns:w="urn:sche...

Coldfusion forms and image upload with cffile

I'm learning some Coldfusion, and I'm having trouble with this small form based application I'm building for a coworker. Here is the first page: http://pastebin.com/aLPYHPsF As you can see, what I want to do is get the user input and take that input and output it to html. The text stuff works fine, but I can't get the image to upload! ...

Cast as integer in ColdFusion; sanitizing variables

I'm rusty at ColdFusion, I've been used to PHP for so long. What I want to do is something like this: <?php $id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0; ?> Basically, check for a url parameter called id and if it exists make sure it's an integer so I can safely use it in database queries. If it ends up zero, that's fine too. ...

Remove MSWord formatting using ColdFusion Regex

We have a lot of data that contains nasty MS Word formatting like this: <!--[if !mso]> <mce:style><! v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:Tr...

Problems with CF9's EntityLoad()

I've only just started out with CF9's ORM features, and have run into a problem. I've got a single table set up - member - which has 2 records in it. If I try: <cfscript> members = EntityLoad("member"); writedump(members); </cfscript> ...I should get an array of member objects; but I get the error: unexpected token: member near lin...

Coldfusion deploy into Google app with Eclipse

I've download eclipse-jee-galileo-win32.zip and following instruction of this post, http://blog.kukiel.net/2009/09/coldfusion-on-google-app-engine-with.html After that, I encounter following errors once I've deleted war file and replace openbd's war files into my project. Please let me know if you have such problem just like me. ...

Intelligent date range parsing of human input?

Has anyone come across a script / cl app written in any language that handles the parsing of human-entered dates well? I'd love to be able to parse, for example: "3 to 4 weeks" "2 - 3 days" "3 weeks to 2 months" ...

What is multiserver installation in Coldfusion?

I'm not clear that what is the benefits of Multiserver installation in Coldfusion? Which benefits can I get when I installed like that in my server? ...

Possible to inject thumbnail photos into AD via cfldap?

Does anyone have a way to inject thumbnail photos of users into AD? When I get data via cfldap, I can see the entry for thumbnailphoto, but the entry for MY record (which has a photo attached to it manually) has an empty string in that field. Any suggestions? Thanks! Chris ...

Why is jboss seeing an empty List<Object> from Coldfusion webservice that returns an array of structs?

I have a coldfusion 8 webservice that returns an array <cffunction access="remote" name="testMethod" returntype="array"> <cfset myArray = ArrayNew(1)> <cfset myArray[1] = "Steve"> <cfreturn myArray/> </cffunction> I am using jboss 5.1 GA community with Jbossws 3.2.2.GA consuming the service. The stubs are being built with ...