weixin_33714884 2014-06-02 14:26 采纳率: 0%
浏览 34

为什么我得到对象对象错误?

I have a simple ajax request to change the value of some php session variable I still get object object error no matter how I changed the code :

JS code:

$(document).ready(function(){
    $('#facebook_img').live('click',function(){
        login_condetion=1;
        $.ajax({
            type: "POST",
            url: 'facebook_login_condition_variable.php',
            data:{login_condetion:login_condetion},
            success: function()
            {
                alert('test');
            },
            error : function(XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest);  
                alert(textStatus);
                alert(errorThrown);
                alert(XMLHttpRequest.responseText);
            }
        });

    });
});

facebook_login_condition_variable.php :

   <?php 
    $temp = $_POST['login_condetion'];
    if(!empty($temp) && $temp != 0)
    {
       $_SESSION['do_not_allow_auto_facebook_login'] = 1;
    }
    else    
    {
        $_SESSION['do_not_allow_auto_facebook_login'] = 0;  
    }
    ?>

I tried a lot of ajax form but same error and I get nothing when I alert responseText I do not understand why I still get that error ? I hope to find some help here thank u

  • 写回答

1条回答 默认 最新

  • hurriedly% 2014-06-02 14:28
    关注

    This is not an error... It means that the variables you try to alert are objects.

    If you want to see the content of it, replace alert by console.log and see the javascript console of your browser...

    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀