ppsirg

Untitled

Mar 5th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function getWSprice() {
  2. var xmlHttp;
  3. if (window.XMLHttpRequest){
  4. xmlHttp=new XMLHttpRequest();
  5. xmlHttp["timeout"] = 3;
  6. }
  7. var urlDir = "http://localhost:8000/asset/ws";
  8. xmlHttp.open("GET", urlDir, true);
  9. xmlHttp.send();
  10. console.log(xmlHttp.response)
  11. wsPrices = JSON.parse(xmlHttp.response);
  12. console.log(wsPrices)
  13. return wsPrices;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment