Previous 199869 Revisions Next

r24872 Tuesday 13th August, 2013 at 14:08:05 UTC by Miodrag Milanović
make it work on IE too (nw)
[web]index.html

trunk/web/index.html
r24871r24872
2424     writeToScreen('<b style="color: green;">Connected</b>');
2525    };
2626    websocket.onclose = function(ev) {     
27      writeToScreen('<b style="color: white;">disconnected</b>');
27      writeToScreen('<b style="color: white;">Disconnected</b>');
2828    };
2929    websocket.onmessage = function(ev) {
3030   if (ev.data=='update_machine')
3131   {
32      $.getJSON('json/game', function(data) {
32      $.ajax({
33        url: "json/game",
34        cache: false,
35        dataType: "json",
36        success: function(data) {
3337         var items = [];
34         if(data.name =='___empty') {
38         if(data.name =='__empty') {
3539            items.push('No driver running');
3640         } else {
3741            items.push('<h1>Currently running : ' + data.description + ' [' + data.manufacturer+']</h1>');
3842
3943         }
4044         document.getElementById('current').innerHTML = items.join('');
41      });
45        },
46        error: function (request, status, error) { alert(status + ", " + error); }
47      });   
4248   }
4349
4450    };

Previous 199869 Revisions Next


© 1997-2024 The MAME Team