I am completely new to javascript and web development and have a question. I have two HTML files, one includes a search field and a search button, the other one should (late
Your sending the entire object to the page, while you should send just its value.
Use this code to get the value of an input :
var value = document.getElementById("input").value;
Then, it's really simple to redirect to other page sending data via URL. You just need to redirect adding a parameter like this :
window.location.href = "searchresult.html?city="+value;