tags:

views:

118

answers:

0

I have this part in my jquery ready function:

$(this).ajaxSubmit({
    url: '../lib/strapper.php',
    data:p, //where p is an object = {...}
    dataType:'json',

    success:function(result){   
                               alert('test');

                           }, failure:function(){ alert('failed'); }  
    });

and in my strapper.php I output:

 $o = array("success"=>true,'data'=>array('pagehtml'=>'hello world!'));
 echo json_encode($o); //this is a valid json according to json validator
 // but no alert pops up although firebug gets the response

*failure function would not alert as well, but the weird thing is on my other application with the same code it is working fine!! How come?!