]> git.scottworley.com Git - reliable-chat/commitdiff
Use XMLHttpRequest POST to send messages
authorScott Worley <sworley@chkno.net>
Sun, 19 Aug 2012 15:49:09 +0000 (08:49 -0700)
committerScott Worley <sworley@chkno.net>
Sun, 19 Aug 2012 15:49:09 +0000 (08:49 -0700)
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();
                }
        }
 
                }
        }