문제

This one may be simple. Javascript alerts are not working on MSIE for Xbox One. I've tested them on a PC, OSX, Nokia phone, iPhone.

Javascript obviously works as I'm using socket.io.

Here is the code:

function changeGamerTag() {
    if (socket.socket.connected) {
        socket.emit('partyup add user', prompt("Enter GAMERTAG: ") + '['+ masterrace + ']');
    } else {
      alert('Party server offline.');
    }
}
도움이 되었습니까?

해결책 2

I've found the answer:

IE 10 for XBox does not support Javascript prompt.

The JavaScript prompt() method isn’t supported.

다른 팁

You could try a library like jQuery UI: https://jqueryui.com/dialog/. See the example under 'view source' for which libraries & css to include. Then use this to show the dialog:

$('<div title="Oops"><p>Party server offline.</p></div>').dialog();

The alert doesn't pop up or your code is not reaching till alert statement. Can you put alert stmt as first stmt in your function "changeGamerTag" and check if alert comes up.

Your HTML is completely invalid: you have 2 BODY sections and one extra closing HEAD. Also socket.io.js fails to download.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top