CFAjax |
techscreencast.com (Quality Technical Screencast) |
| [ Home ] [ Examples ] [ Project / Download ] [ FAQ / How To] [ Docs/Articles] [ About Me ] |
|
CFAjax InstallationCFAjax comes with a sets of sample examples that you can install and experiment with, they provides you with the code sample on how the JavaScript library interacts with the coldfusion code. Here is the step by step instruction on how to install CFAjax to run sample apps
NOTE: in some cases the system/OS might not be able to resolved the localhost and instead of that you might have to use the machinename or 127.0.0.1 IP address if that is the case with your system, you should use the installation utility provide in the zip file i.e. browse to http://127.0.0.1/utility/installation.cfm following parameters should be provided to this utility
Using CFAjax on Existing/Production SiteIn order to use CFAjax all you need is the core folder that comes along with the installation utility core folder has four files that are explained below.
In order to make Ajax calls from your html pages you have to include the following two .js files depending upon the location of where you copied the core folder you might have to change the src location <script type='text/javascript' src='/ajax/core/engine.js'></script> <script type='text/javascript' src='/ajax/core/util.js'></script> <script type='text/javascript' src='/ajax/core/settings.js'></script> You will also have to specify the location of where the coldfusion function that you are calling are located <script language="javascript"> _cfScriptLocation = "http://localhost/ajax/examples/functions.cfm"; </script>you can have a single coldfusion file that holds all your function or can have multiple files, choice is yours, but each of the coldfusion code files that you expose to CFAjax should include the parsing engine file "cfajax.cfm" <cfinclude template="core/cfajax.cfm"> |