I fixed my own problem... (gotta love that!)
Turns out that I was extending ajax.cfc wrong. oops :)
Christopher Jordan wrote:
Hi folks,
I'm trying to implement one of Rob's simplest examples (the echo
example), only I'm trying to modify it just a little bit.
I was reading in the manual that in the following call:
<script type='text/_javascript_'>_ajaxConfig =
{'_cfscriptLocation':'echoTest.cfc',
'_jsscriptFolder':'../js'};</script>
the '_cfscriptLocation':'echoTest.cfc', part wasn't
required because you could specify it directly when you made the
DWREngine._execute call.
Well that's what I'm having problems with. Here's my code:
<html>
<head>
<title>example2 echo test</title>
<style>
fieldset {padding: 10px; width: 100px;}
legend {font-weight: bold;}
</style>
<script type='text/_javascript_'>_ajaxConfig =
{'_jsscriptFolder':'core/js'};</script>
<script type='text/_javascript_'
src=''></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('MyFirstAjaxCFC.cfc', null, 'echo',
str, doEchoResult);
//DWREngine._execute('', 'MyFirstAjaxCFC.cfc', 'echo', str,
doEchoResult);
//DWREngine._execute('./', 'MyFirstAjaxCFC.cfc', 'echo',
str, doEchoResult);
DWREngine._execute('.', 'MyFirstAjaxCFC.cfc', '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 >
<input type="Text" id="echoInput"><input type="submit"
value="enter">
</form>
</fieldset>
<div id="echoScreen" style="overflow: scroll; height: 100px;">
</div>
</body>
</html>
as you can see, I've tried varying syntax for the
DWREngine
call, but all of them return some sort of error (mostly "Invalid reply
from server." which according to Rob's code indicates a 404 error from
the server).
My directory structure looks like this:
/Chris/AJAX/core/js
my CFCs and example cfm files exist in the AJAX directory while robs
code reside in the core and js directories just as they come in the zip
file from his site.
I feel like its a path-type issue, but I'm not 100% sure.
Can anyone spot what I'm doing wrong? :(
Chris
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/
|
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.HostMySite.com
www.teksystems.com/