]> git.scottworley.com Git - reliable-chat/blobdiff - webclient/rc.html
Use XMLHttpRequest POST to send messages
[reliable-chat] / webclient / rc.html
index a8bc337a2193ebbc8c6506b97b5f9772afbb63e7..da5874a30c0de7ce2679ee11bd85bcd74970469f 100644 (file)
                        "?id=" + encodeURIComponent(message.ID) +
                        "&text=" + encodeURIComponent(message.Text);
                for (var i in servers) {
                        "?id=" + encodeURIComponent(message.ID) +
                        "&text=" + encodeURIComponent(message.Text);
                for (var i in servers) {
-                       var uri = rcserverbase(servers[i]) + path;
-                       var img = document.createElement("img");
-                       img.setAttribute("src", uri);
-                       d.appendChild(img);
+                       var xhr = new XMLHttpRequest();
+                       xhr.open("POST", rcserverbase(servers[i]) + path);
+                       xhr.send();
                }
        }
 
                }
        }