CFAjax |
techscreencast.com (Quality Technical Screencast) |
| [ Home ] [ Examples ] [ Project / Download ] [ FAQ / How To] [ Docs/Articles] [ About Me ] |
|
|
Basic requirments for CFAjax CFAjax licence CFAjax is an open source product, you are free to use and distribute CFAjax with your applications. All we request is to let us know if you are using CFAjax in your application so that we can maintain a master list of all the CFAjax users and help us promote this project.
What all browser does CFAjax supports
Can i use CFAjax to request data from another server
<script language="javascript">
DWREngine.setVerb("GET"); //default is POST
</script>
How can i fill html drop down and pouplated both value and text field <cfset retStruct = StructNew()> <cfset StructInsert(retStruct, "10, Tenth Grade")> <cfset StructInsert(retStruct, "5, 5th Grade")> <cfset StructInsert(retStruct, "1, 1st Grade")>Example 2 : Returning a Array Key Value sample uses this approach If you are returning an array and want it populate key value of dropdown list you will have to provide the hint attribute in your CF function to let CFAjax know that this array needs special treatment. Function should be defined like this <cffunction name="functionname" hint="type='keyvalue' jsreturn='array'"> and the CF code should create the array like this
<cfset retArr = ArrayNew(1)> <cfset ArrayAppend(standingArray, "10, Tenth Grade")> <cfset ArrayAppend(standingArray, "5, 5th Grade")> <cfset ArrayAppend(standingArray, "1, 1st Grade")>Example 3 : Returning a List If you are returning an List and want it populate key value of dropdown list you will have to provide the hint attribute in your CF function to let CFAjax know that this List needs special treatment. Function should be defined like this <cffunction name="functionname" hint="type='keyvalue' jsreturn='array'"> and the CF code should create the array like this
<cfset retList = ""> <cfset retList = ListAppend(retList, "10=Tenth Grade")> <cfset retList = ListAppend(retList, "5=5th Grade")> <cfset retList = ListAppend(retList, "1=1st Grade")> |