Login

    Register

PROJECT CATEGORIES

 

CFJS (ColdFusionJavaScript for jQuery)
Project Home Blog Known Issues External Project Link Contact Project

Author: Christopher Jordan (All RIAForge projects by this author)
Last Updated: July 8, 2007 3:19 PM
Version: 1.1.8
Views: 17604
Downloads: 657
Demo URL: http://cjordan.us/jquery/plugins/index.cfm?page=CFJSDemo
License: MIT

Description:

CFJS is a library of almost 70 ColdFusion functions written in JavaScript. The library is available as a jQuery plug-in and now also as a standard JavaScript object.

[--- Examples ---]

Some folks have asked for examples. Here are a couple.

1. Check to see if the structure in the array element is defined and if so, check to see that the key, "columnnamesort" exists, behaive accordingly...
This example assumes that myArray and ColumnDetailStruct are defined.

if($.IsDefined(myArray[myArray.length - 1]) && $.StructKeyExists(myArray[myArray.length - 1], "columnnamesort")){
ColumnDetailStruct.columnnamesort = (myArray[myArray.length -1].columnnamesort) + 10;
}
else{ // the key, "columnnamesort" did not exist... so create it and set it to 10.
ColumnDetailStruct.columnnamesort = 10;
}


2. This example shows how one could replace what would normally be a long if statement similar to:

if(a == value1 || a == value2 || a == value3 ... || a == valueN){
// do something cool if the above is true
}

... into the following code which is potentially *much* shorter ...

(this example assumes that a variable ThisReportType has already been defined)

var myList = "Daily Needs,Fill Rate,Spend Recap";
if($.ListFindNoCase(myList, ThisReportType)){
//do something special for these types of reports
}

Requirements:

jQuery is required to use the CFJS jQuery plug-in.

If you're going to use the CFJS library by itself then download the non-jQuery version under branches in the SVN. With this branch there are no other requirements.

Issue Tracker:

ID ISSUE STATUS UPDATED
9 DateDiff yyyy doesn't take into account month/day Closed 05/02/08 5:45 PM
8 base function Closed 07/08/07 3:37 PM
7 Issue with DateFormat function when current date starts with "M" Fixed 06/11/07 9:55 AM
6 DatePart() is missing two date parts: 'y' and 'ww' Closed 05/16/07 8:20 PM
5 IsArray() does not do dimension checking Closed 05/07/07 6:23 PM

View All Issues

To enter issues for this (or any other) project, you must be logged in.

Subversion Access:

You may access this project's Subversion repository with your client here: http://svn.riaforge.org/cfjs.

You may download the latest set of files from Subversion as a zip file.

Anonymous users have read access to the repository while the administrator has write access.

This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/