How would I open a new window in JavaScript and insert HTML data instead of just linking to an HTML file?
You can use window.open
to open a new window/tab (according to browser setting) in JavaScript.
By using document.write
you can write HTML content to the opened window.