Hey,
Have you tried to get the examples working that come with the code.
This is a good starting block. Have you got those working?

It might help you to strip the newlines out of the response text as
well. Helped me.
Add:

r = "";
s = str;
for (i=0; i < s.length; i++) 
{
        if (    s.charAt(i) != '\n' &&
                s.charAt(i) != '\r' &&
        s.charAt(i) != '\t'
                ) 
        {
        r += s.charAt(i);
        }
        if ( s.charAt(i) == ';')
        {
                r += '\n';
        }
}

After the other new code and before the eval. Then I recommend doing an
old fashion alert to have a look at the value of str.

The other thing I did was add a huge textarea to my page and then spat
the str value into that textarea from the engine.js code.

But, having read you post again it sounds like the response you are
getting is being alerted in the _errorHandler function in engine.js.
If it was me I would still add a big textarea and look at the value of
the data varaible that way. Don't you just love debugging in js..

No you don't have to do anything on the server.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chad
Renando
Sent: Tuesday, 21 June 2005 12:09 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Ajax


Thanks Bec!

I added them in, as so: 
     index = response.lastIndexOf(');')
     str = response.substring(0, index + 2);
     eval(response);

I have changed the paths to the js files as well as the line in the
initial function call for:
DWREngine._urlBase = "http://mypath.cfm";;.  

I am now getting a CF error that tries to appear in a Javascript
pop-up.  The error is too big to read what the offending line is.  Is
there a way to get this appearing so I can read and troubleshoot?

Also, do I need to do anything server side to get Ajax to run?

Chad
who wants to love Ajax


On 6/21/05, Bec Gorton <[EMAIL PROTECTED]> wrote:
> Hey Chad.
> I have been playing with ajax for the last day or so. Its really good.
> Its been worth the time invested.
> 
> I had quite a few problems trying to get it to work when coldfusion
> debugging is turned on. The call.req.responseText has a heap of
> debugging html appended on the end. The ajax code then tries to run
this
> using eval. Needless to say it dies. I added a few lines of code to
> strip the html off the end of the response text before the eval call.
> Have a look in engine.js at the _stateChange function.
> I added the lines
> 
> index = response.lastIndexOf(');')
> str = response.substring(0, index + 2);
> 
> Before the eval call. With this added it all works with debugging
turned
> on.
> 
> The other problems that I had involve values returned from the server
> that contain "'". For example: Wilkes 'HILTON' Refuge. I added code in
> the coldfusion function that strips any "'" found in the stuff
returned
> from the db.
> 
> Hope that helps.
> B.
> 
> 
> Rebecca "Bec" Gorton
> Application Developer
> Australian Antarctic Data Centre
> Australian Antarctic Division
> Channel Highway
> Kingston 7050 Australia
> Telephone +613 6232 3587
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Chad
> Renando
> Sent: Tuesday, 21 June 2005 11:39 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] Ajax
> 
> 
> Thanks to David for the link to CFAjax:
http://www.indiankey.com/cfajax/
> 
> I am looking into it and was wondering if any of you had any
> experience with it?
> 
> Chad
> who didn't sleep well last night
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>
________________________________________________________________________
___
> 
>     Australian Antarctic Division - Commonwealth of Australia
> IMPORTANT: This transmission is intended for the addressee only. If
you are not the
> intended recipient, you are notified that use or dissemination of this
communication is
> strictly prohibited by Commonwealth law. If you have received this
transmission in error,
> please notify the sender immediately by e-mail or by telephoning +61 3
6232 3209 and
> DELETE the message.
>         Visit our web site at http://www.aad.gov.au/
>
________________________________________________________________________
___
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
        Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to