How to Make a Pop Up With an iFrame in JavaScript

By Matthew Weeks

IFrames and JavaScript prompts are both easily accomplished with modern iterations of HTML.
i Stockbyte/Stockbyte/Getty Images

There are a number of reasons why you might want to combine the attributes of a JavaScript pop up window with an HTML IFrame tag. You may be passing variables to a pop up that queries a database with those variables in turn. You may not want your user to be able to see the URL in play, and be able to query your database with their own script. Whatever the case, inserting an IFrame into a JavaScript pop up window requires only a static page and a simple JavaScript prompt.

Step 1

Create a new static HTML page. Within the tags, place an