Build a website with javascript games and other dynamic content

Step Six - change location

If you click on the button above a short function will be executed which will bring you to the file step6.htm (where we are already.) That button was defined like

<input type="button"


value="go nowhere" >

and calls the following script.


function go_to_url(target_url)





In the script the give URL was assigned to be the hyper reference of the browsers window current location. If it would have been different a new page would have been loaded. It is effectivly just as if a user clicks on a link. The difference is that the script changes the location by itself.

Next step



My Games

Get Games

Build Games
1 - simple javascripts
2 - change form values
3 - statusbar & mouse
4 - change images
5 - preload images
6 - change location
7 - open/close windows
8 - other sources

Feedback or Questions

about me


Copyright by Armin Kielack 1998 last modified: