includes/clientside/static/ajax.js
changeset 823 4596c40aaa94
parent 800 9cdfe82c56cd
child 869 58bc29c14a4d
equal deleted inserted replaced
822:3b951ea8e758 823:4596c40aaa94
    11   if ( ns_id[1] == 'Special' || ns_id[1] == 'Admin' )
    11   if ( ns_id[1] == 'Special' || ns_id[1] == 'Admin' )
    12     return false;
    12     return false;
    13   enableUnload();
    13   enableUnload();
    14   setAjaxLoading();
    14   setAjaxLoading();
    15   var redir = ( disable_redirect ) ? '&redirect=no' : '';
    15   var redir = ( disable_redirect ) ? '&redirect=no' : '';
    16   ajaxGet(append_sid(scriptPath + '/ajax.php?title=' + physical_title +'&_mode=getpage&noheaders' + redir), function() {
    16   ajaxGet(append_sid(scriptPath + '/ajax.php?title=' + physical_title +'&_mode=getpage&noheaders' + redir), function(ajax) {
    17     // Allow for 404 here, it's generated by the "page not found" error message
    17     // Allow for 404 here, it's generated by the "page not found" error message
    18     // (even with noheaders specified, probably should be fixed)
    18     // (even with noheaders specified, probably should be fixed)
    19     if ( ajax.readyState == 4 && ( ajax.status == 200 || ajax.status == 404 ) ) {
    19     if ( ajax.readyState == 4 && ( ajax.status == 200 || ajax.status == 404 ) ) {
    20       unsetAjaxLoading();
    20       unsetAjaxLoading();
    21       document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
    21       document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
    48   setAjaxLoading();
    48   setAjaxLoading();
    49   document.getElementById('protbtn_0').style.textDecoration = 'none';
    49   document.getElementById('protbtn_0').style.textDecoration = 'none';
    50   document.getElementById('protbtn_1').style.textDecoration = 'none';
    50   document.getElementById('protbtn_1').style.textDecoration = 'none';
    51   document.getElementById('protbtn_2').style.textDecoration = 'none';
    51   document.getElementById('protbtn_2').style.textDecoration = 'none';
    52   document.getElementById('protbtn_'+l).style.textDecoration = 'underline';
    52   document.getElementById('protbtn_'+l).style.textDecoration = 'underline';
    53   ajaxPost(stdAjaxPrefix+'&_mode=protect', 'reason='+ajaxEscape(r)+'&level='+l, function() {
    53   ajaxPost(stdAjaxPrefix+'&_mode=protect', 'reason='+ajaxEscape(r)+'&level='+l, function(ajax) {
    54     if ( ajax.readyState == 4 && ajax.status == 200 ) {
    54     if ( ajax.readyState == 4 && ajax.status == 200 ) {
    55       unsetAjaxLoading();
    55       unsetAjaxLoading();
    56       if(ajax.responseText == 'good')
    56       if(ajax.responseText == 'good')
    57         return true;
    57         return true;
    58       // check for JSON error response
    58       // check for JSON error response
   175   var innerBox = getElementsByClassName(box, 'div', 'mp-body')[0];
   175   var innerBox = getElementsByClassName(box, 'div', 'mp-body')[0];
   176   var whiteout = whiteOutElement(innerBox);
   176   var whiteout = whiteOutElement(innerBox);
   177   whiteout.style.width = ( $dynano(whiteout).Width() - 78 ) + 'px';
   177   whiteout.style.width = ( $dynano(whiteout).Width() - 78 ) + 'px';
   178   whiteout.style.left = ( $dynano(whiteout).Left() + 44 ) + 'px';
   178   whiteout.style.left = ( $dynano(whiteout).Left() + 44 ) + 'px';
   179   
   179   
   180   ajaxPost(stdAjaxPrefix + '&_mode=rename', 'newtitle=' + ajaxEscape(newname), function()
   180   ajaxPost(stdAjaxPrefix + '&_mode=rename', 'newtitle=' + ajaxEscape(newname), function(ajax)
   181     {
   181     {
   182       if ( ajax.readyState == 4 && ajax.status == 200 )
   182       if ( ajax.readyState == 4 && ajax.status == 200 )
   183       {
   183       {
   184         whiteout.parentNode.removeChild(whiteout);
   184         whiteout.parentNode.removeChild(whiteout);
   185         var response = String(ajax.responseText);
   185         var response = String(ajax.responseText);
   365   
   365   
   366   prompt_obj.innerHTML = '<img alt="loading" style="display: block; margin: 0 auto;" src="' + cdnPath + '/images/loading-big.gif" />';
   366   prompt_obj.innerHTML = '<img alt="loading" style="display: block; margin: 0 auto;" src="' + cdnPath + '/images/loading-big.gif" />';
   367   
   367   
   368   // tenemos la confirmación y la razón - borre la página.
   368   // tenemos la confirmación y la razón - borre la página.
   369   setAjaxLoading();
   369   setAjaxLoading();
   370   ajaxPost(stdAjaxPrefix + '&_mode=deletepage', 'reason=' + ajaxEscape(trim(reason.value)), function()
   370   ajaxPost(stdAjaxPrefix + '&_mode=deletepage', 'reason=' + ajaxEscape(trim(reason.value)), function(ajax)
   371     {
   371     {
   372       if ( ajax.readyState == 4 && ajax.status == 200 )
   372       if ( ajax.readyState == 4 && ajax.status == 200 )
   373       {
   373       {
   374         unsetAjaxLoading();
   374         unsetAjaxLoading();
   375         
   375         
   422           },
   422           },
   423           onclick: function(e)
   423           onclick: function(e)
   424           {
   424           {
   425             miniPromptDestroy(this);
   425             miniPromptDestroy(this);
   426             setAjaxLoading();
   426             setAjaxLoading();
   427             ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() {
   427             ajaxGet(stdAjaxPrefix+'&_mode=delvote', function(ajax) {
   428               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   428               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   429                 unsetAjaxLoading();
   429                 unsetAjaxLoading();
   430                 alert(ajax.responseText);
   430                 alert(ajax.responseText);
   431               }
   431               }
   432             }, true);
   432             }, true);
   462           },
   462           },
   463           onclick: function(e)
   463           onclick: function(e)
   464           {
   464           {
   465             miniPromptDestroy(this);
   465             miniPromptDestroy(this);
   466             setAjaxLoading();
   466             setAjaxLoading();
   467             ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() {
   467             ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function(ajax) {
   468               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   468               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   469                 unsetAjaxLoading();
   469                 unsetAjaxLoading();
   470                 alert(ajax.responseText);
   470                 alert(ajax.responseText);
   471                 item = document.getElementById('mdgDeleteVoteNoticeBox');
   471                 item = document.getElementById('mdgDeleteVoteNoticeBox');
   472                 if(item)
   472                 if(item)
   497 {
   497 {
   498   // IE <6 pseudo-compatibility
   498   // IE <6 pseudo-compatibility
   499   if ( KILL_SWITCH )
   499   if ( KILL_SWITCH )
   500     return true;
   500     return true;
   501   setAjaxLoading();
   501   setAjaxLoading();
   502   ajaxGet(stdAjaxPrefix+'&_mode=catedit', function() {
   502   ajaxGet(stdAjaxPrefix+'&_mode=catedit', function(ajax) {
   503     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   503     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   504       unsetAjaxLoading();
   504       unsetAjaxLoading();
   505       edit_open = false;
   505       edit_open = false;
   506       eval(ajax.responseText);
   506       eval(ajax.responseText);
   507     }
   507     }
   524     var s = ( document.forms.mdgCatForm['mdgCat_' + catlist[i]]['checked'] ) ? true : false;
   524     var s = ( document.forms.mdgCatForm['mdgCat_' + catlist[i]]['checked'] ) ? true : false;
   525     if(s) query = query + '&' + catlist[i] + '=true';
   525     if(s) query = query + '&' + catlist[i] + '=true';
   526   }
   526   }
   527   setAjaxLoading();
   527   setAjaxLoading();
   528   query = query.substring(1, query.length);
   528   query = query.substring(1, query.length);
   529   ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function() {
   529   ajaxPost(stdAjaxPrefix+'&_mode=catsave', query, function(ajax) {
   530     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   530     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   531       unsetAjaxLoading();
   531       unsetAjaxLoading();
   532       edit_open = false;
   532       edit_open = false;
   533       if(ajax.responseText != 'GOOD') alert(ajax.responseText);
   533       if(ajax.responseText != 'GOOD') alert(ajax.responseText);
   534       ajaxReset();
   534       ajaxReset();
   542 {
   542 {
   543   // IE <6 pseudo-compatibility
   543   // IE <6 pseudo-compatibility
   544   if ( KILL_SWITCH )
   544   if ( KILL_SWITCH )
   545     return true;
   545     return true;
   546   setAjaxLoading();
   546   setAjaxLoading();
   547   ajaxGet(stdAjaxPrefix+'&_mode=histlist', function() {
   547   ajaxGet(stdAjaxPrefix+'&_mode=histlist', function(ajax) {
   548     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   548     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   549       unsetAjaxLoading();
   549       unsetAjaxLoading();
   550       edit_open = false;
   550       edit_open = false;
   551       selectButtonMajor('article');
   551       selectButtonMajor('article');
   552       selectButtonMinor('history');
   552       selectButtonMinor('history');
   560   // IE <6 pseudo-compatibility
   560   // IE <6 pseudo-compatibility
   561   if ( KILL_SWITCH )
   561   if ( KILL_SWITCH )
   562     return true;
   562     return true;
   563   if(!ttl) ttl=title;
   563   if(!ttl) ttl=title;
   564   setAjaxLoading();
   564   setAjaxLoading();
   565   ajaxGet(append_sid(scriptPath+'/ajax.php?title='+ttl+'&_mode=getpage&oldid='+oldid), function() {
   565   ajaxGet(append_sid(scriptPath+'/ajax.php?title='+ttl+'&_mode=getpage&oldid='+oldid), function(ajax) {
   566     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   566     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   567       unsetAjaxLoading();
   567       unsetAjaxLoading();
   568       edit_open = false;
   568       edit_open = false;
   569       document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
   569       document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
   570     }
   570     }
   574 window.ajaxRollback = function(id) {
   574 window.ajaxRollback = function(id) {
   575   // IE <6 pseudo-compatibility
   575   // IE <6 pseudo-compatibility
   576   if ( KILL_SWITCH )
   576   if ( KILL_SWITCH )
   577     return true;
   577     return true;
   578   setAjaxLoading();
   578   setAjaxLoading();
   579   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
   579   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function(ajax) {
   580     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   580     if ( ajax.readyState == 4 && ajax.status == 200 ) {
   581       unsetAjaxLoading();
   581       unsetAjaxLoading();
   582       
   582       
   583       var response = String(ajax.responseText + '');
   583       var response = String(ajax.responseText + '');
   584       if ( !check_json_response(response) )
   584       if ( !check_json_response(response) )
   627           },
   627           },
   628           onclick: function(e)
   628           onclick: function(e)
   629           {
   629           {
   630             miniPromptDestroy(this);
   630             miniPromptDestroy(this);
   631             setAjaxLoading();
   631             setAjaxLoading();
   632             ajaxGet(stdAjaxPrefix+'&_mode=flushlogs', function() {
   632             ajaxGet(stdAjaxPrefix+'&_mode=flushlogs', function(ajax) {
   633               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   633               if ( ajax.readyState == 4 && ajax.status == 200 ) {
   634                 unsetAjaxLoading();
   634                 unsetAjaxLoading();
   635                 alert(ajax.responseText);
   635                 alert(ajax.responseText);
   636                 window.location.reload();
   636                 window.location.reload();
   637               }
   637               }
   719     if(arrDiff1Buttons[k].checked) id1 = arrDiff1Buttons[k].id.substr(6);
   719     if(arrDiff1Buttons[k].checked) id1 = arrDiff1Buttons[k].id.substr(6);
   720     if(arrDiff2Buttons[k].checked) id2 = arrDiff2Buttons[k].id.substr(6);
   720     if(arrDiff2Buttons[k].checked) id2 = arrDiff2Buttons[k].id.substr(6);
   721   }
   721   }
   722   if(!id1 || !id2) { alert('BUG: Couldn\'t get checked radiobutton state'); return; }
   722   if(!id1 || !id2) { alert('BUG: Couldn\'t get checked radiobutton state'); return; }
   723   setAjaxLoading();
   723   setAjaxLoading();
   724   ajaxGet(stdAjaxPrefix+'&_mode=pagediff&diff1='+id1+'&diff2='+id2, function()
   724   ajaxGet(stdAjaxPrefix+'&_mode=pagediff&diff1='+id1+'&diff2='+id2, function(ajax)
   725     {
   725     {
   726       if ( ajax.readyState == 4 && ajax.status == 200 )
   726       if ( ajax.readyState == 4 && ajax.status == 200 )
   727       {
   727       {
   728         unsetAjaxLoading();
   728         unsetAjaxLoading();
   729         document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
   729         document.getElementById('ajaxEditContainer').innerHTML = ajax.responseText;
   763   }
   763   }
   764   if ( id == '_blank' )
   764   if ( id == '_blank' )
   765   {
   765   {
   766     return null;
   766     return null;
   767   }
   767   }
   768   ajaxGet(stdAjaxPrefix + '&_mode=getstyles&id=' + id, function() {
   768   ajaxGet(stdAjaxPrefix + '&_mode=getstyles&id=' + id, function(ajax) {
   769       if ( ajax.readyState == 4 && ajax.status == 200 )
   769       if ( ajax.readyState == 4 && ajax.status == 200 )
   770       {
   770       {
   771         // IE doesn't like substr() on ajax.responseText
   771         // IE doesn't like substr() on ajax.responseText
   772         var response = String(ajax.responseText + ' ');
   772         var response = String(ajax.responseText + '');
   773         response = response.substr(0, response.length - 1);
       
   774         if ( response.substr(0,1) != '[' )
   773         if ( response.substr(0,1) != '[' )
   775         {
   774         {
   776           alert('Invalid or unexpected JSON response from server:\n' + response);
   775           alert('Invalid or unexpected JSON response from server:\n' + response);
   777           return null;
   776           return null;
   778         }
   777         }
   837   {
   836   {
   838     alert('Theme or style ID is zero length');
   837     alert('Theme or style ID is zero length');
   839     return true;
   838     return true;
   840   }
   839   }
   841   
   840   
   842   ajaxPost(stdAjaxPrefix + '&_mode=change_theme', 'theme_id=' + ajaxEscape(theme_id) + '&style_id=' + ajaxEscape(style_id), function()
   841   ajaxPost(stdAjaxPrefix + '&_mode=change_theme', 'theme_id=' + ajaxEscape(theme_id) + '&style_id=' + ajaxEscape(style_id), function(ajax)
   843     {
   842     {
   844       if ( ajax.readyState == 4 && ajax.status == 200 )
   843       if ( ajax.readyState == 4 && ajax.status == 200 )
   845       {
   844       {
   846         if ( ajax.responseText == 'GOOD' )
   845         if ( ajax.responseText == 'GOOD' )
   847         {
   846         {
   883   if ( KILL_SWITCH )
   882   if ( KILL_SWITCH )
   884     return true;
   883     return true;
   885   load_component('crypto');
   884   load_component('crypto');
   886   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   885   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   887   setAjaxLoading();
   886   setAjaxLoading();
   888   ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function()
   887   ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function(ajax)
   889     {
   888     {
   890       unsetAjaxLoading();
   889       unsetAjaxLoading();
   891       if ( ajax.readyState == 4 && ajax.status == 200 )
   890       if ( ajax.readyState == 4 && ajax.status == 200 )
   892       {
   891       {
   893         alert(ajax.responseText);
   892         alert(ajax.responseText);
   908     alert('Can\'t get kill div object');
   907     alert('Can\'t get kill div object');
   909     return false;
   908     return false;
   910   }
   909   }
   911   $killdiv.object.innerHTML = '<img alt="Loading..." src="' + scriptPath + '/images/loading-big.gif" /><br />Making request...';
   910   $killdiv.object.innerHTML = '<img alt="Loading..." src="' + scriptPath + '/images/loading-big.gif" /><br />Making request...';
   912   var url = makeUrlNS('Admin', 'Home', 'src=ajax');
   911   var url = makeUrlNS('Admin', 'Home', 'src=ajax');
   913   ajaxPost(url, 'act=kill_php', function() {
   912   ajaxPost(url, 'act=kill_php', function(ajax) {
   914       if ( ajax.readyState == 4 && ajax.status == 200 )
   913       if ( ajax.readyState == 4 && ajax.status == 200 )
   915       {
   914       {
   916         if ( ajax.responseText == '1' )
   915         if ( ajax.responseText == '1' )
   917         {
   916         {
   918           var $killdiv = $dynano('php_killer');
   917           var $killdiv = $dynano('php_killer');
   939 window.ajaxCatToTag = function()
   938 window.ajaxCatToTag = function()
   940 {
   939 {
   941   if ( KILL_SWITCH )
   940   if ( KILL_SWITCH )
   942     return false;
   941     return false;
   943   setAjaxLoading();
   942   setAjaxLoading();
   944   ajaxGet(stdAjaxPrefix + '&_mode=get_tags', function()
   943   ajaxGet(stdAjaxPrefix + '&_mode=get_tags', function(ajax)
   945     {
   944     {
   946       if ( ajax.readyState == 4 && ajax.status == 200 )
   945       if ( ajax.readyState == 4 && ajax.status == 200 )
   947       {
   946       {
   948         unsetAjaxLoading();
   947         unsetAjaxLoading();
   949         var resptext = String(ajax.responseText + ' ');
   948         var resptext = String(ajax.responseText + ' ');
  1037   if ( addtag_nukeme )
  1036   if ( addtag_nukeme )
  1038     return false;
  1037     return false;
  1039   addtag_nukeme = nukeme;
  1038   addtag_nukeme = nukeme;
  1040   tag = ajaxEscape(tag);
  1039   tag = ajaxEscape(tag);
  1041   setAjaxLoading();
  1040   setAjaxLoading();
  1042   ajaxPost(stdAjaxPrefix + '&_mode=addtag', 'tag=' + tag, function()
  1041   ajaxPost(stdAjaxPrefix + '&_mode=addtag', 'tag=' + tag, function(ajax)
  1043     {
  1042     {
  1044       if ( ajax.readyState == 4 && ajax.status == 200 )
  1043       if ( ajax.readyState == 4 && ajax.status == 200 )
  1045       {
  1044       {
  1046         unsetAjaxLoading();
  1045         unsetAjaxLoading();
  1047         var nukeme = addtag_nukeme;
  1046         var nukeme = addtag_nukeme;
  1109   if ( parentobj.previousSibling.previousSibling.previousSibling.nodeValue == $lang.get('tags_lbl_page_tags') + ' ' &&
  1108   if ( parentobj.previousSibling.previousSibling.previousSibling.nodeValue == $lang.get('tags_lbl_page_tags') + ' ' &&
  1110        parentobj.nextSibling.nextSibling.firstChild )
  1109        parentobj.nextSibling.nextSibling.firstChild )
  1111     if ( parentobj.nextSibling.nextSibling.firstChild.nodeValue == $lang.get('tags_btn_add_tag'))
  1110     if ( parentobj.nextSibling.nextSibling.firstChild.nodeValue == $lang.get('tags_btn_add_tag'))
  1112       writeNoTags = true;
  1111       writeNoTags = true;
  1113     
  1112     
  1114   ajaxPost(stdAjaxPrefix + '&_mode=deltag', 'tag_id=' + String(tag_id), function()
  1113   ajaxPost(stdAjaxPrefix + '&_mode=deltag', 'tag_id=' + String(tag_id), function(ajax)
  1115     {
  1114     {
  1116       if ( ajax.readyState == 4 && ajax.status == 200 )
  1115       if ( ajax.readyState == 4 && ajax.status == 200 )
  1117       {
  1116       {
  1118         if ( ajax.responseText == 'success' )
  1117         if ( ajax.responseText == 'success' )
  1119         {
  1118         {
  1157 
  1156 
  1158 var keepalive_interval = false;
  1157 var keepalive_interval = false;
  1159 
  1158 
  1160 window.ajaxPingServer = function()
  1159 window.ajaxPingServer = function()
  1161 {
  1160 {
  1162   ajaxGet(stdAjaxPrefix + '&_mode=ping', function()
  1161   ajaxGet(stdAjaxPrefix + '&_mode=ping', function(ajax)
  1163     {
  1162     {
  1164     });
  1163     });
  1165 }
  1164 }
  1166 
  1165 
  1167 window.ajaxToggleKeepalive = function()
  1166 window.ajaxToggleKeepalive = function()
  1219   target.innerHTML = '';
  1218   target.innerHTML = '';
  1220   var img = document.createElement('img');
  1219   var img = document.createElement('img');
  1221   img.src = cdnPath + '/images/loading.gif';
  1220   img.src = cdnPath + '/images/loading.gif';
  1222   img.alt = 'Loading...';
  1221   img.alt = 'Loading...';
  1223   target.appendChild(img);
  1222   target.appendChild(img);
  1224   ajaxGet(makeUrlNS('Admin', 'Home/updates.xml'), function()
  1223   ajaxGet(makeUrlNS('Admin', 'Home/updates.xml'), function(ajax)
  1225     {
  1224     {
  1226       if ( ajax.readyState == 4 && ajax.status == 200 )
  1225       if ( ajax.readyState == 4 && ajax.status == 200 )
  1227       {
  1226       {
  1228         var releases = new Array();
  1227         var releases = new Array();
  1229         var update_available = false;
  1228         var update_available = false;
  1439   }
  1438   }
  1440   var request = toJSONString({
  1439   var request = toJSONString({
  1441       mode: action,
  1440       mode: action,
  1442       plugin: plugin_filename
  1441       plugin: plugin_filename
  1443     });
  1442     });
  1444   ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function()
  1443   ajaxPost(makeUrlNS('Admin', 'PluginManager/action.json'), 'r=' + ajaxEscape(request), function(ajax)
  1445     {
  1444     {
  1446       if ( ajax.readyState == 4 && ajax.status == 200 )
  1445       if ( ajax.readyState == 4 && ajax.status == 200 )
  1447       {
  1446       {
  1448         var response = String(ajax.responseText + '');
  1447         var response = String(ajax.responseText + '');
  1449         if ( !check_json_response(response) )
  1448         if ( !check_json_response(response) )
  1500 {
  1499 {
  1501   if(text) var ipaddr = text;
  1500   if(text) var ipaddr = text;
  1502   else var ipaddr = o.innerHTML;
  1501   else var ipaddr = o.innerHTML;
  1503   rDnsObj = o;
  1502   rDnsObj = o;
  1504   rDnsBannerObj = bannerOn('Retrieving reverse DNS info...');
  1503   rDnsBannerObj = bannerOn('Retrieving reverse DNS info...');
  1505   ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function() {
  1504   ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function(ajax) {
  1506       if ( ajax.readyState == 4 && ajax.status == 200 )
  1505       if ( ajax.readyState == 4 && ajax.status == 200 )
  1507       {
  1506       {
  1508         off = fetch_offset(rDnsObj);
  1507         off = fetch_offset(rDnsObj);
  1509         dim = fetch_dimensions(rDnsObj);
  1508         dim = fetch_dimensions(rDnsObj);
  1510         right = off['left'] + dim['w'];
  1509         right = off['left'] + dim['w'];