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 Coze智能助手搭建过程中的问题请教
  • ¥15 12864只亮屏 不显示汉字
  • ¥20 三极管1000倍放大电路
  • ¥15 vscode报错如何解决
  • ¥15 前端vue CryptoJS Aes CBC加密后端java解密
  • ¥15 python随机森林对两个excel表格读取,shap报错
  • ¥15 基于STM32心率血氧监测(OLED显示)相关代码运行成功后烧录成功OLED显示屏不显示的原因是什么
  • ¥100 X轴为分离变量(因子变量),如何控制X轴每个分类变量的长度。
  • ¥30 求给定范围的全体素数p的(p-2)/p的连乘积值
  • ¥15 VFP如何使用阿里TTS实现文字转语音?