I am trying to make some sort of search engine, I have the input set up, but I need to load the searched tearm into my results page, I am using javascript for this, 1 page for input, one file to store the data, and 1 file to output the data.
INPUT:
var inputBox = document.getElementById("input-box");
var searchButton = document.getElementById("search-button");
var input = "";
searchButton.onclick = function() {
input = inputBox.value;
input = input.toLowerCase();
console.log("Input: " + input);
getData(input);
}
DATASTORE:
var storeSearchedTearm = "";
getData = function(whatToStore) {
console.log("Database collection: " + whatToStore);
storeSearchedTearm = whatToStore;
console.log("Database added to store: " + storeSearchedTearm);
}
OUTPUT:
console.log("Data: " + storeSearchedTearm);
var searchedTearm = "";
searchedTearm = storeSearchedTearm;
console.log("Output: " + searchedTearm);