This is post one of two
The example form below shows an example of what I mean. Change the text in the input field (or leave it as-is) and click the "Write to popup" button. A small popup window will appear with the content from the text box. This is entirely browser based and does not require a trip back to the server to load another page.
Note that if you are reading this in a feed reader or an email then it's unlikely the form above will work, so click through to view this post in a web browser.
How it works
window.open returns a handle to the window that was opened, so the methods for that window can then be called including the write() method. So you can do this, for example:
var w = window.open('', '', 'width=400,height=400,resizeable,scrollbars'); w.document.write('Content goes here'); w.document.close(); // needed for chrome and safari
The third line which calls the close() method is required for Chrome and Safari and without it the content will not render in the popup.
The full code from the working example is as follows: