© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.