Archived
1
0
This commit is contained in:
Jeff Becker 2016-12-26 11:46:27 -05:00
parent ada1a614ea
commit 69c20952ad

View File

@ -25,7 +25,7 @@ function inject_search(elem) {
output.appendChild(e); output.appendChild(e);
} }
button.onclick = function(ev) { var search = function() {
var text = input.value; var text = input.value;
input.value = ""; input.value = "";
var group = newsgroup.value; var group = newsgroup.value;
@ -53,10 +53,22 @@ function inject_search(elem) {
} else { } else {
status.innerHTML = "searching... "; status.innerHTML = "searching... ";
} }
} };
ajax.open("GET", "/api/find?text="+text+"&group="+group); ajax.open("GET", "/api/find?text="+text+"&group="+group);
ajax.send(); ajax.send();
} };
button.onclick = function(ev) {
search();
};
input.onsubmit = function(ev) {
search();
};
newsgroup.onsubmit = function(ev) {
search();
};
inner.appendChild(document.createTextNode("text: ")); inner.appendChild(document.createTextNode("text: "));
inner.appendChild(input); inner.appendChild(input);