You should be using Request.JSON (
http://mootools.net/docs/core/Request/Request.JSON) instead of just Request.
When using Request.JSON the response will come as a Javascript Object so you
can do:

onSuccess: function(jsonResponse){
  if(jsonResponse[0].status == 'error') //your code
}

The structure of the response is seen on the alert, thats why im using
[0].status.
Cya.


--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces


On Wed, Mar 31, 2010 at 12:42 AM, Steve Onnis <[email protected]>wrote:

> Its returning a JSON result, not an array. That might be a good place to
> start
>
> -----Original Message-----
> From: matthew kooshad [mailto:[email protected]]
> Sent: Wednesday, 31 March 2010 1:26 PM
> To: MooTools Users
> Subject: [Moo] responseText.split('|')
>
> hello,
> here is the basic form: http://olemisstutor.com/login.php
> in the onsuccess function of my request obj, i am doing msg =
> responseText.split('|');
> when i alert(msg[0]), it is alerting "error". but, when i check if
> (msg[0] == 'error'), it is false. why is that?
>
> will someone take a look please? i have the fields prepopulating so
> just need to hit submit btn to see the above happen.
> thank you!
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>
>

Reply via email to