aboutsummaryrefslogtreecommitdiff
path: root/assets_src/js/list.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets_src/js/list.js')
-rw-r--r--assets_src/js/list.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/assets_src/js/list.js b/assets_src/js/list.js
new file mode 100644
index 0000000..25ff80d
--- /dev/null
+++ b/assets_src/js/list.js
@@ -0,0 +1,17 @@
1function clickSearchResult(resId) {
2 var xhr = new XMLHttpRequest();
3 xhr.onreadystatechange = function() {
4 if (xhr.readyState == XMLHttpRequest.DONE) {
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;
12 }
13 }
14 xhr.open('POST', window.location, true);
15 xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
16 xhr.send('id=' + resId);
17} \ No newline at end of file