-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvanillaApp.js
34 lines (21 loc) · 867 Bytes
/
vanillaApp.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// this function takes the question object returned by the StackOverflow request
// and returns new results to be appended to DOM
var showQuestion = function(question) {
return result;
};
// this function takes the results object from StackOverflow
// and returns the number of results and tags to be appended to DOM
var showSearchResults = function(query, resultNum) {
var results = resultNum + ' results for <strong>' + query + '</strong>';
return results;
};
// takes a string from input and searches
// for unaswered questions on StackOverflow API.
var getUnanswered = function(tags) {
};
document.getElementById('unanswered-getter').addEventListener('submit',function(e){
e.preventDefault();
document.getElementById('results').innerHTML+="";
var tags = document.getElementById('tags').value;
getUnanswered(tags);
});