How would I open a new window in JavaScript and insert HTML data instead of just linking to an HTML file?
+1
A:
Here is some info that should be useful:
http://www.codetoad.com/forum/15_27898.asp
Henrik Söderlund
2010-01-21 12:45:39
+2
A:
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.
rahul
2010-01-21 12:46:50
A:
When you create a new window using open
, it returns a reference to the new window, you can use that reference to write to the newly opened window via its document
object.
Here is an example:
var newWin = open('url','newName','height=300;width:300');
newWin.document.write('html to write...');
Oded
2010-01-21 12:53:41