coldfusion-8

Post parameters from AJAX request undefined in form scope in ColdFusion

邮差的信 提交于 2019-12-02 01:17:29
I am working on a ColdFusion 8 training application where I'm making some AJAX requests (without any libraries such as jQuery) to support a very basic CRUD application. The high level architecture includes a CFM view, a CFC with remote access methods which receive the AJAX requests, and a CFC which acts as a model and has all of the database queries. For just retrieving data that doesn't require any sort of bind variables (like getting all rows from the table), the AJAX queries are working fine. When I try to post anything to the CFC middle layer, however, I'm getting errors about the values I

ColdFusion - Creating column names dynamically with CFLOOP

♀尐吖头ヾ 提交于 2019-12-02 01:05:44
I have a table that records the name of uploaded documents, up to 14 per record. The columns are named thus: TABLE tblDocuments COLUMNS documentID (int, not null, pk) document1 (varchar(250), null) document2 (varchar(250), null) /* and this continues through */ document14 (varchar(250), null) So I query for any documents for a particular record: <cfquery name="qryGetDocs" datasource="#dsn#"> SELECT document1, ...document14 FROM tblDocuments WHERE documentID = <cfqueryparam name="SESSION.documentID" cfsqltype="cf_sql_integer"> </cfquery> The form looks something like this: <form name=

How to remove more than one whitespace character from HTML?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 00:23:45
I want to remove extra whitespace which is coming from the user end, but I can't predict the format of the HTML. For example: <p> It's interesting that you would try cfsetting, since nothing in it's documentation would indicate that it would do what you are asking. Unless of course you were mis-reading what "enableCFoutputOnly" is supposed to do. </p> <p> It's interesting that you would try cfsetting, since nothing in it's documentation would indicate that it would do what you are asking. Unless of course you were mis-reading what "enableCFoutputOnly" is supposed to do.</p> Please guide me on

Using cachedwithin attibute inside cfquery

牧云@^-^@ 提交于 2019-12-01 18:16:43
When you use the cachedwithin attribute in a cfquery how does it store the query in memory. Does it store it by only the name you assign to the query? For example, if on my index page I cache a query for an hour and name it getPeople will a query with the same name on a different page (or the same page for that matter) use the cached results or does it use some better logic to decide if it is the same query? Also, if there is a variable in your query does the cache take into account the value of the variable? It's not only the name -- it's the exact query you're running. <cfquery name=

How to restart Coldfusion Application Server when application times out?

我的未来我决定 提交于 2019-12-01 01:15:07
Is there any way to restart the CF server through the Application.cfc, when the application times out? As per Adobe documentation, they showed as follows: <cffunction name="onApplicationEnd"> <cfargument name="ApplicationScope" required=true/> <cflog file="#This.Name#" type="Information" text="Application #Arguments.ApplicationScope.applicationname# Ended" > </cffunction> What I would like to do is replace the <cflog> above with <cfexecute> as follows: <cfexecute name = "C:\CFRestart.bat" outputFile = "C:\output.txt" timeout = "1"> </cfexecute> So OnApplicationEnd will run the CFRestart.bat

View cfhttp request

妖精的绣舞 提交于 2019-11-29 14:18:40
I would like to view the actual http request that gets sent via my cfhttp tag. What is the best tool to capture this? Specially, I want to see exactly what headers and content are being sent. To expand on what Edward has said and to answer your question about how you can view a request on ColdFusion; Create a page that simply dumps everything out from GetHttpRequestData(). Have a look at the livedocs on getHttpRequestData() for more information. Use Charles http proxy. Add the proyport and proxyhost attribute that points to your running instance of Charles. Caveat is that your machine will

Export to Excel not displaying numbers correctly

纵然是瞬间 提交于 2019-11-28 14:08:54
I'm having a hard time getting account numbers to display correctly when exporting data from database to an Excel spreadsheet. The account number for one company, shows up correctly. However, others don't. Users have to double click in the cell to see the whole account number. I have Googled this issue and none of the solutions that I've tried worked. <cfsetting enablecfoutputonly="Yes"> <cfsavecontent variable="sTest"> <cfoutput> <table> <tr><th align="center">ATTUID</th> <th>Company Name</th> <th align="center">Account Number </th> <th align="center">Total Past Due Balance</th> <th align=

How do you use java files in Coldfusion

主宰稳场 提交于 2019-11-27 23:01:10
I need to import a java file into a coldfusion 8 page e.g. : public class Hello { public String testJava() { return "Hello Java!!"; } } In Coldfusion I have the following code: <cfscript> helloWorld = CreateObject("java","Hello"); helloTest = helloWorld.testJava(); </cfscript> I then receive the error Object Instantiation Exception. Class not found: Hello In my Coldfusion server Java Virtual Machine Path is set to 'C:/ColdFusion8/runtime/jre', So this is where I have put my java file, is this correct? Should I put a .java, .class or .jar there? Does the file name need to be consistent with

Getting Unable to read WSDL error

坚强是说给别人听的谎言 提交于 2019-11-27 09:46:07
This is first time I'm using SOAP.I'm trying to invoke a webservice using cfinvoke which is as follows: <cfinvoke webservice="https://xyz/infoLookup.php?wsdl" method="infoLookup" returnVariable="info" > <cfinvokeargument name="phoneNumber" value="7182973186"/> <cfinvokeargument name="userName" value="12345"/> <cfinvokeargument name="password" value="password"/> </cfinvoke> <cfdump var="#info#"> And here is a part of the message name from the WSDL : <message name="infoLookupRequest"> <part name="phoneNumber" type="xsd:string" /> <part name="userName" type="xsd:string" /> <part name="password"

ColdFusion not catching NoClassDefFoundError

a 夏天 提交于 2019-11-27 09:43:58
I am using ColdFusion 8. I would like to catch a NoClassDefFoundError exception in ColdFusion however I can't... It still fails and logs the error in the exception.log file. Here is what I tried. <cftry> <cfset myJavaObject.myMethod()> <cfcatch type="any"> <cfdump var="#cfcatch #"> </cfcatch> <cfcatch type="java.lang.Throwable"> Horrible exception. <cfdump var="#cfcatch #"> </cfcatch> </cftry> But this does not work. Could you please show me how to do that? I need to catch this error at a particular place and not in the OnError function of my Application.cfc. Now that I have had more coffee, I