From 2ab6a079d8290390b62a6a639cbf80615494d21e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 13 Aug 2013 14:08:05 +0000 Subject: make it work on IE too (nw) --- web/index.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/web/index.html b/web/index.html index d392f3eaea9..13280cb6405 100644 --- a/web/index.html +++ b/web/index.html @@ -24,21 +24,27 @@ writeToScreen('Connected'); }; websocket.onclose = function(ev) { - writeToScreen('disconnected'); + writeToScreen('Disconnected'); }; websocket.onmessage = function(ev) { if (ev.data=='update_machine') { - $.getJSON('json/game', function(data) { + $.ajax({ + url: "json/game", + cache: false, + dataType: "json", + success: function(data) { var items = []; - if(data.name =='___empty') { + if(data.name =='__empty') { items.push('No driver running'); } else { items.push('

Currently running : ' + data.description + ' [' + data.manufacturer+']

'); } document.getElementById('current').innerHTML = items.join(''); - }); + }, + error: function (request, status, error) { alert(status + ", " + error); } + }); } }; -- cgit v1.2.3