coldfusion

Something wrong in Application.CFC

Hello all. Just writing out my own blog in ColdFusion and all of a sudden, I open up eclipse on my dev machine, check the site in Chrome and it doesn't load. So I tried moving Application.cfc to another folder, voila the page works. The exact error message is: The system has attempted to use an undefined value, which usually indicate...

ColdFusion check if jQuery is loaded

Hi All, I've created this simple script to check if jQuery is loaded <cfoutput> <cfif GetPageContext().getCFOutput().getBuffer().findStringNoCase("jquery.js") eq -1> <script type="text/javascript" src="jquery.js"></script> </cfif> <script> $(document).ready( function() { $("##theValue").val("the replacement"); }); ...

Codlfusion ORM: Can not load SQL after an init of ORM.

Hi All, Trying to drop/create table with orm but facing a situation: When I try to drop/create table I see tables are created but data. I have a sql which contains data but no luck. I have proper definitions for the sql that has to be imported when I drop/create. this.ormsettings = {autorebuild="false"}; this.ormsettings.dialect= "...

Dynamic property defaults in CF9 ORM

How do you set up dynamic property defaults on CF9 ORM objects? For instance, I know I can set a property default like this: property name="isActive" default="1"; But what if you want to have a dynamically generated default, such as a date or a UUID? property name="uuid" default="#createUUID()#"; ...throws an error - so what's the...

Aggregating and displaying facebook and twitter status updates on Coldfusion Page

Hello All, As an experiment I'd like to set up a coldfusion page that will pull and display the status updates from my own facebook account and twitter accounts that fall within an input date range; similar to tools like http://orsiso.com/ http://www.threadsy.com/ and http://www.davidcramer.net/lifestream I assume this will involv...

Pulling facebook and twitter status updates into a SQL database via Coldfusion Page

Hello All, I'd like to set up a coldfusion page that will pull the status updates from my own facebook account and twitter accounts and put them in a SQL database along with their timestamps. Whenever I run this page it should only grab information after the most recent time stamp it already has within the database. I'm hoping this wo...

non javascript timer

Hey guys, I'm making a quiz with a limit, I want to keep track of the time left with something other than javascript, Because with javascript the user could simply pause the timer by disabling javascript, and take as much time as they need. and when they are done they could simply turn JS back on and submit the quiz. I'm using coldfusion...

Check if a form field is defined with a variable in the name

I have an interesting problem here... <cfloop from="1" to="#form.countField#" index="i"> <cfif isdefined('form["semester#i#"]')> <cfquery name = "insertCourses" datasource="cas_evaluation"> INSERT INTO courses (faculty, semester, course, students, hours, team_taught, first_time, ec_dl, online, course_revision ) VALUES ( '#form.nam...

Webpage integration with newest versions of Facebook and Twitter; need to use PHP?

Hello All, As a test I am trying to create the simplest webpage where I can type a short post and have it simultaneously update my twitter account status and my facebook status. I also want to be able to read and display past statuses on this page as well. So basically I am trying to code the simplest example that can push and pull wi...

Parse exported bookmarks file with ColdFusion

I need to parse a list of bookmarks exported from a browser like Chrome, Firefox and IE. Maybe even google etc. I played around and did something like this reMatchNoCase("(<h3)(.*?)(</dl>)",myfile1) loop. Then I use reMatchNoCase("(<dt[>])(.*?)(</a>)",i) within the h3/dl tags, and then a lot of cleanup, but its really not reliable. The...

coldfusion threads: looping session variables + sleep

hey guys I'm trying to create a timer which counts the time spent on a page using a thread heres what I have so far: <cfset session.time=0> <cfthread name="timer" action="run"> <cfscript> counter = 0; while (counter <9000) { sleep(1000); session.time++; counter ++; } </cfscript> </cfthread> page 2: <cfoutput>#session...

What is the best way to include specific jQuery functions to authenticated/logged-in users on my ColdFusion page?

I've got a ColdFusion page that I want to include some admin level jQuery functions to authenticated users but I'm not sure what the best practice is for achieving this. Currently, I have a cfif statement inside my document.ready that checks to see if the user is logged in (session scope) and if so, runs a cfinclude to a file with the ad...

Loading google maps markers faster dynamically

I'm trying to generate a Google Map based off of results from a database. I can get the addresses geocoded and put out on the map, but I'm not able to do it very quickly. I have a setTimeout function to help with loading the markers; if i do not include it then not all of the markers will load. Is there any way for me to push out the m...

Set NULL values in CF9 ORM

Is there a way to get CF9 ORM to insert NULL Values into the database rather than an empty string? I've got a numeric field which can be null, but throws an error because it's trying to enter ''. ...

JavaScript / jQuery Global onError Handler

Hi All, I've been asked to add the HopToad JavaScript Notifier to a site. The JavaScript can be seen here. What I am wondering is if there is a way that I can set a global error handler for JavaScript / jQuery the way I can with ColdFusion, where any error that occurs, AJAX or just in a function, causes the HopToad.notify(e) function t...

View cfhttp request

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. ...

Faceted Search in Coldfusion and SQL?

Hi guys, I'm working on a faceted search in Coldfusion and SQL. I've tried creating a query like this: SELECT * FROM Turbos WHERE PartNumber LIKE '%#trim(SearchCriteria)#%' OR PartDescription LIKE '%#trim(SearchCriteria)#%' AND (PumpingSpeed BETWEEN #minimum# AND #URL.speed#) AND InletFlange LIKE '#URL.inlet#' AND Beari...

How to replace CHAR(13) in DB varchar(6000)?

Using ColdFusion and Microsoft SQL we are exporting data to an Excel Spreadsheet using the cfx_excel plugin. The data contains a varchar(6000) which has CHAR(13)/line-breaks inputted in each entry. The line-breaks are appearing as square brackets every time the report is generated in Excel format. How would I go about removing the CHAR...

JVM and Memory Usage - JRun server not using full PSPermGen allocation?

Hi there I'm trying to understand why out ColdFusion 9 (JRun) server is throwing the following error: java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space? The JVM arguments are as follows: -server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC - I had jconsole runni...

Getting directory listing from SVN for use in ANT dropdown

Hi ANT experts :-) I've done some Googling on this but I can't seem to find anything along the lines of what I'm needing. I'm using ANTForms for the GUI on our deployment. Developers can choose the build from the dynamically populated dropdown, hit ok and away it goes. The way the dropdown is dynamically populated at the moment is by...