This chapter is from the book
Redirecting the Web Page
Another extremely useful feature of JavaScript is the ability to redirect the browser away from the current URL to another location. You do this by setting the location.href value to a new URL. The new URL can be a full address, such as http://mysite.com/newlocation/index.html, or a relative location to the current URL, such as page2.html.