Hi all, here is my latest code, still doesnt work with ie, but it is
cleaner and neater now, before i continue, i would like to thanks
those who have try to help me..
=D
A variable call "last" is use to track the latest post id, so that i
could use it to query the database and retrieve messages a
Hi Matt,
I have remove the trailing comma from the Json already, but it is
still the same..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to pr
There is a trailing comma in your object that IE doesn't like,
considering a syntax error. Remember when evaling something that the
expression you're evaluating has to have perfect syntax as well.
On Sep 28, 12:39 pm, uncleroxk <[EMAIL PROTECTED]> wrote:
> ok my JSON:
>
> {"messages": {"messag
On Sep 29, 12:22 am, kangax <[EMAIL PROTECTED]> wrote:
> On Sep 28, 11:10 am, uncleroxk <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have try to change it to "var response = eval(request.responseJSON);
> > ".. and add "header("Content-type: application/json");" on my php page
> > that generate the Jso
ok my JSON:
{"messages": {"message":[ {"id": "75",
"user": "name",
"text": "message",
"time": "Sun, 28 Sep, 08:19
PM"
},]}}
---
On Sep 28, 11:10 am, uncleroxk <[EMAIL PROTECTED]> wrote:
> I have try to change it to "var response = eval(request.responseJSON);
> ".. and add "header("Content-type: application/json");" on my php page
> that generate the Json.. but it is still not working...
>
> here is my updated version..
>
Hi,
You don't have to eval the responseJSON. The point of the
responseJSON property is that the JSON has already been decoded into
an object for you. So if you have page returning:
{
"foo": "bar"
}
and your handler looks like this
function oncomplete(response)
{
I have try to change it to "var response = eval(request.responseJSON);
".. and add "header("Content-type: application/json");" on my php page
that generate the Json.. but it is still not working...
here is my updated version..
-
On Sep 28, 10:00 am, Blaze <[EMAIL PROTECTED]> wrote:
> Hello,
>
> indeed something wrong here:
> var response = eval("(" + request.responseText + ")");
>
> You should just use:
> var response = eval(request.responseText);
Not really.
Those parenthesis around a to-be-evaluated string make it
(syn
Hello,
indeed something wrong here:
var response = eval("(" + request.responseText + ")");
You should just use:
var response = eval(request.responseText);
Also I hope that you have right response for that 'for loop' to work.
Cheers
On Sep 28, 2:21 pm, uncleroxk <[EMAIL PROTECTED]> wrote:
> Hi
Hi,
Why not use the responseJSON property?
http://www.prototypejs.org/api/ajax/response
Also:
> //callback function
> function loadcomplete(request)
Your variable name there is probably misleading, as the callback
receives an Ajax.Response object, not the Ajax.Request object.
HTH,
--
T.J. Cro
Edit.. i mean i debug with the Alert function in IE... with firebug on
firefox is fine.. Alert shows up well in firefox too, but not in IE
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us"
12 matches
Mail list logo