function popUp(){Although we cannot create a new HTML document with JavaScript, we can overwrite the contents of an existing document. The existing "blank" document will vary from browser to browser, but does exist, and therefore can be overwritten.
var frog = window.open("","wildebeast","width=300,height=300,scrollbars=1,resizable=1")
var text = document.form.input.value
var html = "<html><head></head><body>Hello, <b>"+ text +"</b>."
html += "How are you today?</body></html>"
//variable name of window must be included for all three of the following methods so that
//javascript knows not to write the string to this window, but instead to the new window
frog.document.open()
frog.document.write(html)
frog.document.close()
}
frog.document.write(html)Writing From a Sub Window to Its Opener Window
frog.document.close()