Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendind HTML to a browser window, w/o creating a page? 1

Status
Not open for further replies.

dantre

Programmer
Aug 18, 2005
21
US
Hi,

I was wondering if it was possible to open a browser window that contains some HTML, without actually creating/loading an actual .html file.

For example, I know this won't work, but something like this would be great:

Code:
window.open("<html><body>hello world!</body></html>");

Thanks, Dan
 
>I was wondering if it was possible to open a browser window that contains some HTML, without actually creating/loading an actual .html file.
Like this within some function.
[tt]
var owin=window.open();
with (owin) {
document.open();
document.write("<html><body>hello world!</body></html>");
document.close();
}
[/tt]
 

wow, i can't believe i didn't think of that.

create a window, and write to it.

duh!

Thanks tsuji!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top