© Mark J. Collins 2017

Mark J.  Collins, Pro HTML5 with CSS, JavaScript, and Multimedia, 10.1007/978-1-4842-2463-2_17

17. Window Object

Mark J. Collins

(1)Chesterfield, Virginia, USA

In this chapter I will explain how you can create and manipulate windows with JavaScript. I will start by opening a pop-up window and demonstrate how to control its size and position as well as other attributes. I’ll show how you can use methods on the window object to move and resize a window. I also provide an example that simulates a modal dialog using HTML, CSS, and JavaScript. Finally, I will briefly explain how to use an inline frame to embed content from another source.

Create a Window

I’ll start by opening a new window using JavaScript on an existing window. ...

Get Pro HTML5 with CSS, JavaScript, and Multimedia: Complete Website Development and Best Practices now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.