diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/list.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/assets/js/list.js b/assets/js/list.js index 3a58971..25ff80d 100644 --- a/assets/js/list.js +++ b/assets/js/list.js | |||
@@ -2,7 +2,13 @@ function clickSearchResult(resId) { | |||
2 | var xhr = new XMLHttpRequest(); | 2 | var xhr = new XMLHttpRequest(); |
3 | xhr.onreadystatechange = function() { | 3 | xhr.onreadystatechange = function() { |
4 | if (xhr.readyState == XMLHttpRequest.DONE) { | 4 | if (xhr.readyState == XMLHttpRequest.DONE) { |
5 | alert(xhr.status + ": " + xhr.response); | 5 | if (xhr.status !== 200) { |
6 | alert(xhr.status + ": " + xhr.response); | ||
7 | return; | ||
8 | } | ||
9 | |||
10 | data = xhr.responseText; | ||
11 | document.getElementById("gril-list").innerHTML += data; | ||
6 | } | 12 | } |
7 | } | 13 | } |
8 | xhr.open('POST', window.location, true); | 14 | xhr.open('POST', window.location, true); |