I've been playing around trying to find it with something like this in
my js function.

try {
        alert(request.responseText);
        }
catch(err) {
        alert   (err.toString());
        }

but both the request and response objects are undefined (don't exist).

By trial and error I found there's an "Ajax" object and an
"XMLHttpRequest" object defined in the scope, but I can't get any
responseText out of them. I think the answer lies in the prototype
library, as that's where these callback functions are defined, but I
can't quite figure it out from perusing the docs. Anyway, thanks, I'll
post back if I figure it out! (I think I'll post another topic with
this specific question in it)

On Oct 2, 9:12 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> Sorry, try request.responseText.
> And put it in the Book if it worked. :-)
>
> On 3 Oct 2008, at 02:44, qwanta wrote:
>
>
>
> > On Oct 1, 11:59 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote:
> >> 'callback' doesn't exist, the only names of callbacks you can use are
> >> listed on the page in my last message. :-)
> > Oooops, it was getting late....
>
> >> Other than that, you pretty much got it. I always forget what the
> >> variable name is called, but I think in your callback function you'll
> >> have access to whatever the controller returns in the variable
> >> 'response.responseText'.
>
> > Well, I'm halfway there. I can set the image src from the javascript,
> > but I can't seem to figure out how to get access to the text returned
> > from the controller - "response.responseText" doesn't seem to be it.
> > Is it documented anywhere? I'm drawing a blank with google.
> > In my original non-cakephp javascript, I was getting the text response
> > from the XMLHttpRequest object (ie. xmlHttp.responseXML; ). This
> > object doesn't seem available in the callback either (unless it's
> > called something else).
>
> > mikeg - thanks for the tip, but I think it's close to working with the
> > "official" cakephp prototype solution. I don't want to delve into
> > jquery if I don't have to.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to