So we have to create an HTML document with a script that keeps on opening a new dialog box once the previous one has been closed. When the dialog box is open, the user can't interact with the browser window at all... or so one would think. First let's think of a way to actually do this. It's pretty simple. We create an infinite loop with the alert box inside of the loop.
while (true) { alert ("Alert Message") }
In order to make a script you have to use the script tag and assign the language the script will be using, in this case, Javascript. Then we come to the while statement, it will run infinitely because we have set the parameter to true at all times, it cannot be changed by any variable, because there is no variable to change.
Inside the while loop we have the "alert()" function. Inside of it's parenthesis we can put a message that will be displayed when the page is opened. In this case we used "Alert Message" just to test it out, but you can use any message you'd like to annoy the person that has unfortunately stumbled upon your website. Enjoy!
Just a note, this does have it's limitations, such as that it doesn't work well in Firefox 4. If the user receives a popup twice in a row, Firefox will inject a little check box that the user can check in order to stop the script from running. Another great feature with Firefox is that the user can interact with the outside environment, such as switching to other tabs or closing the current one.