Hey guys I have a small problem and i hope you can help.

Basicly am going to make an search script to my website. Im going to use onkeyup event when the user is writing and my problem is that I wont to make a function that takes in input from the user and put it in the url.
So i need to be able to write and read from the url without refreshing the page. Ive managed to do this using window.location.search but i cant get it to work because the page keeps refreshing. Anyone got an solution or maybe another way doing it ?