Scripts 1 0-loadCFJS
From ADF Docs
Revision as of 20:14, 13 August 2010 by Gcronkright (talk | contribs)
Attention: Do not change any text in the description, signature, and paramter sections.
Return to Scripts_1_0
Description
Loads the CFJS jQuery Plug-in Headers if not loaded.
Signature
public void loadCFJS ( string version )
Parameters
Required | Name | Type | Description |
optional | version | string | [Default: 1.1.9] CFJS version to load. |
Examples
CFJS is a jquery plugin written by http://cjordan.us/archives.cfm/category/cfjs that contains a library of "ColdFusion style" functions (ie. ArrayLen(), GetListAt() and ListFindNoCase(), etc.) written for use in jQuery/JavaScript code.
Usage:
Add the loadCFJS() headers to the top of your custom script page:
<cfscript>
// load jQuery headers
application.ptProfile.scripts.loadJQuery("1.3.2");
// load jQuery CFJS headers
application.ptProfile.scripts.loadCFJS("1.1.9");
</cfscript>
With your jQuery functions call the CFJS library:
<script>
jQuery(function(){
// define a list
var valueList = "One,Two,Three,Four";
// get the value of the item at position 3 of the list
var valuePos = jQuery.ListGetAt(valueList,3,',');
// Display the string 'Three'
alert(valuePos);
});
</script>
References:
CFJS Function listing: [[1]]
Quick reference site for CF functions and function parameters: [[2]]
<cfoutput>#taxObj.getTermName(data[itm].values.myTaxField)#</cfoutput> </cfloop>
</source> -->