JavaScript Assignment #18
Control Window Locations
This assignment gets deeper with windows concepts explored in assignment #14, in particular looking at how to position windows on the screen.
- Create a basic page in html that includes a single image.
- When the image is clicked, it should open 5 new windows in the following locations on the screen:
- one in the top left corner of the screen
- one in the top right corner
- one in the lower left corner
- one in the lower right corner
- one in the center of the screen
- When the main window is closed, all of the sub windows should also automatically close.
- Bonus challenge: using randomization, have a sixth window open in a random location on the page. It should appear in a different location each time the button is pressed.
The URLs displayed for each window can be of your choosing.
Note: you will likely have to give your browser permission to open new windows.
Next assignment ... Assignment #19