Changed the purpose of the repo
Changed from k4li -> currency project
This commit is contained in:
16
Website/scripts/getCurrentCoins.js
Normal file
16
Website/scripts/getCurrentCoins.js
Normal file
@ -0,0 +1,16 @@
|
||||
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);
|
Reference in New Issue
Block a user