聊天弹出窗口不能在其他浏览器中启用

时间:2014-09-02 11:14:31

标签: javascript jquery

我的应用程序中有一个聊天框。因此,如果用户“X”向用户“Y”发送消息,则底部的聊天框应自动为用户“Y”打开。

我补充说 $( “#客舱内容”)显示()。

发送邮件后,但它正在申请,即(“X”)但不适用于其他用户“Y”

<div id="chatbox-content" class="chatbox_content" style="display: <? if ( $ACCOUNT->get_option('chatState') == 'opened' ) echo 'block'; else echo 'none';?>;">

//一些html

接收器

for ( var chat_line in history )
    {
        var account     = history[chat_line]['username'];
        var timestamp   = history[chat_line]['timestamp'];
        var message     = history[chat_line]['message'];
        var contenttype = history[chat_line]['content_type'];
        if ( contenttype == 'text' )
            history_html    += "<p><B>" + account + "</B>: " + message + "</p>";

        if ( contenttype == 'file' )
            history_html    += "<p><B>" + account + " uploaded</B>: <a target=_blank href='data/" + message + "'>"+message.substring(message.length-30)+"</a></p>";

    }
    //
    $("#chat-history").html( history_html );
    $("#chat-session").show();

js file

$ .post(“chat.php”,{action:“send_message”,message:msg},function(data)     {var chatState ='open'; $( “#客舱内容”)显示()。 renderChat(数据); });

请帮帮我。

0 个答案:

没有答案