summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2013-08-13 14:08:05 +0000
committerGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2013-08-13 14:08:05 +0000
commit2ab6a079d8290390b62a6a639cbf80615494d21e (patch) (github)
treec4c2c94ae13ec0d5fe2a43742f20acc43bee3654 /web
parenta586a7ad9bd8fdfe0ecb8d0b211e77520072e42d (diff)
downloadmame-2ab6a079d8290390b62a6a639cbf80615494d21e.tar.bz2
mame-2ab6a079d8290390b62a6a639cbf80615494d21e.zip
make it work on IE too (nw)
Diffstat (limited to 'web')
-rw-r--r--web/index.html14
1 files changed, 10 insertions, 4 deletions
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('<b style="color: green;">Connected</b>');
};
websocket.onclose = function(ev) {
- writeToScreen('<b style="color: white;">disconnected</b>');
+ writeToScreen('<b style="color: white;">Disconnected</b>');
};
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('<h1>Currently running : ' + data.description + ' [' + data.manufacturer+']</h1>');
}
document.getElementById('current').innerHTML = items.join('');
- });
+ },
+ error: function (request, status, error) { alert(status + ", " + error); }
+ });
}
};