Please paste here what the servers' response is.



On 16 Apr., 16:35, spstieng <spsti...@hotmail.com> wrote:
> Ah, got it.
>
> The Post is correct and the Respons is correct... I think. It's in
> JSON, but not sure if it's correct.
>
> According tohttp://docs.jquery.com/Ajax/jQuery.post, last example,
> they have the following line in the php file:
> <?php echo json_encode(array("name"=>"John","time"=>"2pm")); ?>
> This is why they can output the info by alert(data.name).
>
> But if I try this:
>   while ($row = mysql_fetch_array($result))
>   {
>     $data[] = array(
>     "id"=>($row['id']) ,
>     "name"=>($row['name']));
>   }
>   $storeData = json_encode($data);
>
> I still get 'undefined' output :(
>
> On 16 Apr, 15:36, Josch <jluelsd...@googlemail.com> wrote:
>
> > By hitting F12, firebug opens up in Firefox.
> > On the first use, you have to check all three options (Console,
> > Javascript, Network).
> > After reloading the page, you can see the requests and its answers
> > under "Console".
> > Under "Script", you can debug your scripts. Above "Script" you can
> > select which script to debug.
> > There you can set a breakpoint.

Reply via email to