Advertisement
MyOnAsSalat

Untitled

Apr 25th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.  
  3.                     function() {
  4.                                 if(stop) return;
  5.                                 try
  6.                                 {
  7.                                     var xmlHttp = new XMLHttpRequest();
  8.                                     xmlHttp.open( ""GET"", ""http://127.0.0.1:8080/get/"", false ); // false for synchronous request
  9.                                     xmlHttp.send( null );
  10.                                     if(xmlHttp.responseText.length > 0)
  11.                                     {
  12.                                         var values = xmlHttp.responseText.split(' ');
  13.                                         document.getElementById(""fname"").innerHTML = values[0];
  14.                                         document.getElementById(""lname"").innerHTML = values[1];
  15.                                     }
  16.                                 } catch (err)
  17.                                 {
  18.                                     stop = true;
  19.                                 }
  20.                         }                                      
  21.                     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement