includes/clientside/static/misc.js
changeset 407 35d94240a197
parent 372 5bd429428101
child 413 6607cd646d6d
equal deleted inserted replaced
406:7468a663315f 407:35d94240a197
    36   if(text) var ipaddr = text;
    36   if(text) var ipaddr = text;
    37   else var ipaddr = o.innerHTML;
    37   else var ipaddr = o.innerHTML;
    38   rDnsObj = o;
    38   rDnsObj = o;
    39   rDnsBannerObj = bannerOn('Retrieving reverse DNS info...');
    39   rDnsBannerObj = bannerOn('Retrieving reverse DNS info...');
    40   ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function() {
    40   ajaxGet(stdAjaxPrefix+'&_mode=rdns&ip='+ipaddr, function() {
    41       if(ajax.readyState == 4)
    41       if ( ajax.readyState == 4 && ajax.status == 200 )
    42       {
    42       {
    43         off = fetch_offset(rDnsObj);
    43         off = fetch_offset(rDnsObj);
    44         dim = fetch_dimensions(rDnsObj);
    44         dim = fetch_dimensions(rDnsObj);
    45         right = off['left'] + dim['w'];
    45         right = off['left'] + dim['w'];
    46         top = off['top'] + dim['h'];
    46         top = off['top'] + dim['h'];
   398   // let's hope this gets the image cached
   398   // let's hope this gets the image cached
   399   var _ = new Image(32, 32); 
   399   var _ = new Image(32, 32); 
   400   _.src = scriptPath + "/images/good.gif";
   400   _.src = scriptPath + "/images/good.gif";
   401   
   401   
   402   ajaxGet(makeUrlNS('Special', 'Login', 'act=getkey'), function() {
   402   ajaxGet(makeUrlNS('Special', 'Login', 'act=getkey'), function() {
   403       if ( ajax.readyState == 4 )
   403       if ( ajax.readyState == 4 && ajax.status == 200 )
   404       {
   404       {
   405         var response = String(ajax.responseText);
   405         var response = String(ajax.responseText);
   406         if ( response.substr(0,1) != '{' )
   406         if ( response.substr(0,1) != '{' )
   407         {
   407         {
   408           handle_invalid_json(response);
   408           handle_invalid_json(response);
   609     </div>';
   609     </div>';
   610     
   610     
   611   ajax_auth_mb_cache.updateContent(loading_win);
   611   ajax_auth_mb_cache.updateContent(loading_win);
   612   
   612   
   613   ajaxPost(makeUrlNS('Special', 'Login', 'act=ajaxlogin'), 'params=' + json_data, function() {
   613   ajaxPost(makeUrlNS('Special', 'Login', 'act=ajaxlogin'), 'params=' + json_data, function() {
   614       if ( ajax.readyState == 4 )
   614       if ( ajax.readyState == 4 && ajax.status == 200 )
   615       {
   615       {
   616         var response = ajax.responseText;
   616         var response = ajax.responseText;
   617         if ( response.substr(0,1) != '{' )
   617         if ( response.substr(0,1) != '{' )
   618         {
   618         {
   619           alert('Invalid JSON response from server: ' + response);
   619           alert('Invalid JSON response from server: ' + response);