rem: unsetAjaxLoading(); var resptext = String(ajax.responseText + ' '); resptext = resptext.substr(0, resptext.length-1); if ( resptext.substr(0, 1) != '{' ) 
add: if ( ajax.responseText == '1' ) 
context:   ajaxGet(stdAjaxPrefix + '&_mode=get_tags', function()    {      if ( ajax.readyState == 4 )      {        unsetAjaxLoading();        var resptext = String(ajax.responseText + ' ');        resptext = resptext.substr(0, resptext.length-1);        if ( resptext.substr(0, 1) != '{' )        {          alert('Invalid JSON response from server:\n' + resptext);          return false;        }        var json = parseJSON(resptext);        var catbox = document.getElementById('mdgCatBox');        if ( !catbox )          return false;        var linkbox = catbox.parentNode.firstChild.firstChild.nextSibling;        linkbox.firstChild.nodeValue = 'show page categorization';        linkbox.onclick = function() { ajaxTagToCat(); return false; };        catHTMLBuf = catbox.innerHTML;        catbox.innerHTML = '';        catbox.appendChild(document.createTextNode('Page tags: '));        if ( json.tags.length < 1 )        {          catbox.appendChild(document.createTextNode('No tags on this page'));        }        for ( var i = 0; i < json.tags.length; i++ )        {          catbox.appendChild(document.createTextNode(json.tags[i].name));          if ( json.tags[i].can_del )          {            catbox.appendChild(document.createTextNode(' '));            var a = document.createElement('a');            a.appendChild(document.createTextNode('[X]'));            a.href = '#';            a._js_tag_id = json.tags[i].id;            a.onclick = function() { ajaxDeleteTag(this, this._js_tag_id); return false; }            catbox.appendChild(a);          }          if ( ( i + 1 ) < json.tags.length )            catbox.appendChild(document.createTextNode(', '));        }        if ( json.can_add )        {          catbox.appendChild(document.createTextNode(' '));          var addlink = document.createElement('a');          addlink.href = '#';          addlink.onclick = function() { try { ajaxAddTagStage1(); } catch(e) { }; return false; };          addlink.appendChild(document.createTextNode('(add a tag)'));          catbox.appendChild(addlink);        }      }    });
meta: 3765	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3765/d7141bbfd35c2b2bc6e3720f56cfebedaeb26b35/ajax.js/clean/includes/clientside/static/ajax.js