Why cant I connect outside?

  • I added this code
    function button(who, state)
    var xhr = new XMLHttpRequest();
    var body = 'who ’ + who + "\nstate " + state;
    xhr.open(“POST”, ’', true);
    xhr.setRequestHeader(‘Content-Type’, ‘application/x-www-form-urlencoded’);

    for onclick of a simple button. It works fine in browser, why it dont work in Monaco IDE ?
    All I see in console log is
    try - catch dosnt catch any errors too

Log in to reply