Next, we will start to implement a search box. First, here is the code that we used on the previous page:

You can see where a window replace function also might be used to implement a search page. However, to do this right, we need to bring back our old friend, cookies. That is because the new page that we want is a page with search results, and the results page needs to know what the user was searching for. So we store that information in a cookie. Try typing in a key word ("Javascript" or "porn" or what have you), and click the search button.