aboutsummaryrefslogtreecommitdiff
path: root/assets_src/js/list.js
blob: 25ff80db9aa41abf5046d8f543989e403d934e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function clickSearchResult(resId) {
	var xhr = new XMLHttpRequest();
	xhr.onreadystatechange = function() {
	if (xhr.readyState == XMLHttpRequest.DONE) {
			if (xhr.status !== 200) {
				alert(xhr.status + ": " + xhr.response);
				return;
			}

			data = xhr.responseText;
			document.getElementById("gril-list").innerHTML += data;
		}
	}
	xhr.open('POST', window.location, true);
	xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	xhr.send('id=' + resId);
}