ajaxCFC simple echo example
Client Side Script
<script type='text/javascript'>
_ajaxConfig = {	'_cfscriptLocation':'echoTest.cfc',
				'_jsscriptFolder':'../js',
				'debug':true};
</script>
<script type='text/javascript' src='../js/ajax.js'></script>

<script type="text/javascript">
	function doEcho()	{
		
		// get value from input
		var str = $('echoInput').value;
		
		// reset input value
		$('echoInput').value='';
		
		// focus input again
		$('echoInput').focus();
		
		// send data to CF
		DWREngine._execute(_ajaxConfig._cfscriptLocation, null, 'echo', str, doEchoResult);
	}
	
	// call back function
	function doEchoResult (r) {
		// appends response to div
		$('echoScreen').innerHTML = $('echoScreen').innerHTML + '<BR>' + r;
	}
	
</script>

	<fieldset>
	<legend>ajaxCFC simple echo example</legend>
	<form onsubmit="doEcho();return false;">
	<input type="Text" id="echoInput"><input type="submit" value="enter">
	</form>
	</fieldset>
	
Server Side Script
<cfcomponent extends="ajax">
	
	<cffunction name="echo" output="no" access="private">
		<cfargument name="str" required="Yes" type="string">
		
		<cfreturn arguments.str />
	</cffunction>

</cfcomponent>
	
description This is a simple example of a string going to a CFC and coming back.