Commit 4e71ecca authored by Pani's avatar Pani

Debug '&' problem

parent d18c374f
...@@ -253,7 +253,7 @@ function upload_decks() { ...@@ -253,7 +253,7 @@ function upload_decks() {
formData.append('upload['+i+']', filesel.files[i]); formData.append('upload['+i+']', filesel.files[i]);
} }
$.ajax({ $.ajax({
url: "http://"+ip+":"+port+"/api/upload_decks?username="+username+"password="+password, url: "http://"+ip+":"+port+"/api/upload_decks?username="+username+"&password="+password,
type: 'POST', type: 'POST',
cache: false, cache: false,
data: formData, data: formData,
......
...@@ -106,7 +106,7 @@ function login() { ...@@ -106,7 +106,7 @@ function login() {
port=$("#port").val(); port=$("#port").val();
password=$("#password").val(); password=$("#password").val();
username=$("#username").val(); username=$("#username").val();
var es = new EventSource("http://"+ip+":"+port+"/api/msg?username="+username+"password="+password); var es = new EventSource("http://"+ip+":"+port+"/api/msg?username="+username+"&password="+password);
es.onmessage = function(e) { es.onmessage = function(e) {
var data_li = $('<li>'+ e.data +'</li>'); var data_li = $('<li>'+ e.data +'</li>');
data_li.appendTo($("#output")); data_li.appendTo($("#output"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment