Below is a very basic sample of how to implement the JSMX API in ColdFusion. The code contained in this example is NOT a 'snippet' but rather the entire code needed to make this example work. It consists of two small templates (JSMX.html and JSMX.cfm). In this example a hyperlink is placed on an HTML file (JSMX.html). When Clicked, a JavaScript Alert Box will pop up displaying a message sent from the server using Classic Mode (returning JavaScript). In this example we are generating our JavaScript via the CFWDDX tag which will convert a string into a JavaScript expression. This example is very simple in scope but shows how data can be sent between the server and the client using JavaScript. It also demonstrates how you can use the JSMX API without needing any further knowlegde of engine.js than how to call the HTTP() function.
Both the API (engine.js) and a more complete sample application can be downloaded from this website by navigating to the downloads page.