This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/Website/scripts/getCurrentCoins.js

17 lines
394 B
JavaScript
Raw Normal View History

function currencyTicker(){
var ws = new WebSocket("ws://localhost:8765/");
ws.onopen = function(){
console.log("Connection is Established");
ws.send("STATUSONCOIN");
};
ws.onmessage = function(evt) {
var received_msg = evt.data;
w = document.getElementById("odometer").innerHTML = received_msg;
};
}
currencyTicker()
var t=setInterval(currencyTicker,5000);