coldfusion

div tag inside a cfloop tag introduces unwanted line breaks

Hi I have a web page in coldfusion which shows contents from a SQL table. The contents are iterated using cfloop and are rendered using a div block. My code snippet follows- <cfloop query="qry1"> <div class="subBlock"> <div class="item"><h4>Date:</h4><p>#qry1.date#</p></div> <div class="item"><h4>Name:</h4><p>#qry1.name#</p></...

Coldfusion Webservice Parameter Structures

We are trying to consume web services with Coldfusion. I am able to interact with the web service for the most part, however, there is one service where ColdFusion is throwing a "Parameters Could Not Be Found" error because the response message in the WSDL for this particular service is a blank parent class. I need to add the specific ...

Does ColdFusion automatically generate basic HTML tags?

Does ColdFusion automatically generate the basic HTML tags like: <HTML> <head></head> <body></body> </HTML> Or do you have to include that in your source code like ASP or PHP? ...

lint for ColdFusion

Is there an equivalent of jslint for ColdFusion? ...

Calling remote API in ColdFusion occasionally causes timeout

I have a function in my company's site that uses the cgi.remote_host variable to call an API provided by hostip.info and return the country of orgin. The way this is supposed to work is that the function finds the country from the API, runs a query against our local database to determine which site we are going to forward the user to, t...

How can I clean HTML tags out of a ColdFusion string?

I am looking for a quick way to parse HTML tags out of a Coldfusion string. We are pulling in an RSS feed that that could potentially have anything in it. We are then doing some manipulation of the information and then spitting it back out to another place. Currently we are doing this with a regular expression. Is there a better way to d...

Coldfusion sessions not being timed out

We have 2 core applications running on our servers on CF 8, and both have the exact same session timeout set in the application CFC (2 hours at the moment). However we're seeing that sessions are spiralling out of control for one of the applications (currently at 120,000+ on one server), lets call it AppA whereas AppB seems fine (and App...

ColdFusion COM object manipulation of MS Word 2000 dies after 100 seconds

I'm using ColdFusion 7 on a Windows 2003 server to talk to a default installation of Microsoft Word 2000 using COM objects. The goal is to generate a document with some tables in it. That much I'm able to do. The CPU spikes to 100% for the duration, but my code is functional and if it's short, it works. The problem I'm encountering is w...

How to get css property of a DOM element server-side?

I can only think of a client-side solution using jQuery, but is it possible to resolve the css porperties of a page's element from the server side? I was thinking of using a CSS parser to fish out the properties, but that wouldn't work due to the cascade nature of CSS. Thanks! ...

Is output=false by default for cfscript function in CFC?

I thought CFC's methods defined as functions in cfscript are output=false by default, but when I open the CFC in cfcexplorer.cfc (browser directly to the CFC), it says Output: enabled. cfcexplorer.cfc's Bug? ...

Right or wrong way to search within XML element with XMLSearch?

Given the following XML: <cfsavecontent variable="xml"> <root> <parent> <child>I'm the first</child> <child>Second</child> <child>3rd</child> </parent> <parent> <child>Only child</child> </parent> <parent> <child>I'm 10</child> <child>I'm 11!</child> </parent> </root> </cfsavecontent...

Is it possible to dynamically populate a CFC with arguments?

The following code errors: <cfdbinfo datasource="#Application.DSN#" name="getCols" type="columns" table="#this.tableName#"> <cftry> <cfquery name="getColumnDetails" dbtype="query"> SELECT COLUMN_NAME,TYPE_NAME FROM getCols WHERE IS_PRIMARYKEY = 'NO' </cfquery> <cfcatch> <cfset this.ErrorState = true> <cfthrow m...

How can I write a newline in a string in ColdFusion?

Currently I'm putting newlines in strings through one of these two methods: <cfset someStr="This is line 1" & Chr(10) & "This is line 2" & Chr(10) & "This is line 3" /> OR <cfset NL=Chr(10) /> <cfset someStr="This is line 1#NL#This is line 2#NL#This is line 3" /> Is there anything more like the Java/C++ way? Something more like th...

Bindable combobox - selected item/index

I am trying to bind a datagrid item to a combox, so that when the user selects the item in the datagrid the form displays the selected data for editing, however one of my items is a combobox using a dataprovider. I would like the item selected in the datagrid to match the selected item in the combobox, this part is fine however if my da...

Coldfusion/OAuth/Twitter API

I'm trying to integrate with twitter using their OAuth api. I have downloaded and tried the CF implementation here: http://oauth.riaforge.org/ with no success. Anyone have a simple CF to twitter OAuth example for authorizing a user, getting a token, and using it? ...

Invoke coldfusion function using AJAX

Hi I need to invoke a coldfusion function(present in a .cfm file) when the user clicks on a link. And I would like to do it using jQuery. I have a jQuery snippet which looks like- <script type="text/javascript"> $(document).ready(function(){ $("td.ViewLink a").click(function(event){ event.preventDefault(); )} I am ne...

Coldfusion Class definition error. Where is the problem?

I have the following Applicaton.cfc <cffunction name="onApplicationStart" access="public" returntype="Object"> <cfset application.dsn = "myDB" /> <cfset application.userGateway = createObject("component","cfc.UserGateway").init(dsn = application.dsn) /> <cfreturn this /> </cffunction> This is my component UserGateway.cfc <cfcompon...

How do I keep CFEXECUTE from hanging after a PrintStackTrace

I'm using ColdFusion MX7 to perform a CFEXECUTE on some Java 6 code. Unfortunately sins CF7 does not work under JDK 6 I must do it this way. My problem is that when an exception happens in the Java code if I call a printStackTrace on the exception the CFEXECUTE command hangs. Coldfusion eventually times out but the java process cont...

Is there a natural language parser for dates/times in ColdFusion?

Is there a natural language parser for date/times in ColdFusion? ...

Override onMissingTemplate handling in Application.cfc

I want to handle a scenario where user hits a url of /somePage.cfm when that template doesn't exist and use a template from another directory. I know I can do this via rewrites in apache etc. but I don't really want to store logic in there so I gave trying to override onTemplateMissing behaviour in my Application.cfc. It seems to be wo...