plugins/ajim/shoutbox.js
changeset 1 f7b24c744747
parent 0 db23957ad1c7
equal deleted inserted replaced
0:db23957ad1c7 1:f7b24c744747
    19 }
    19 }
    20 
    20 
    21 window.ajim_send_request = function(request)
    21 window.ajim_send_request = function(request)
    22 {
    22 {
    23   request = ajaxEscape(toJSONString(request));
    23   request = ajaxEscape(toJSONString(request));
    24   ajaxPost(makeUrlNS('Special', 'AjimJson'), 'r=' + request, function()
    24   ajaxPost(makeUrlNS('Special', 'AjimJson'), 'r=' + request, function(ajax)
    25     {
    25     {
    26       if ( ajax.readyState == 4 && ajax.status == 200 )
    26       if ( ajax.readyState == 4 && ajax.status == 200 )
    27       {
    27       {
    28         var response = String(ajax.responseText + '');
    28         var response = String(ajax.responseText + '');
    29         if ( !check_json_response(response) )
    29         if ( !check_json_response(response) )
    32           return false;
    32           return false;
    33         }
    33         }
    34         response = parseJSON(response);
    34         response = parseJSON(response);
    35         ajim_handle_response(response);
    35         ajim_handle_response(response);
    36       }
    36       }
    37     });
    37     }, true);
    38 }
    38 }
    39 
    39 
    40 window.ajim_handle_invalid_json = function(response)
    40 window.ajim_handle_invalid_json = function(response)
    41 {
    41 {
    42   ajim_fail_message_list();
    42   ajim_fail_message_list();