• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Javascript open new window with html content

hi,

I am working on a project to popup a new window with javascript.

In my javascript, i get the HTML content already.
How can i popup a new window with those HTML content instead of using URL?

for example, in my javascript, i have a varaiable called "content",
content is holing "<html><body>Helloworld</body></html>"
How can i popup a new window with this content ... that means the new window should show
HelloWorld ... please advise,

Tommy
0
hongclub
Asked:
hongclub
1 Solution
 
wdfdo1986Commented:
keep that content in a seperate file and call the url using window.open
0
 
hongclubAuthor Commented:
if i don't want to export to separate file (just want to pass the content), is other way to do that?

Please advise,
Tommy
0
 
iusephpCommented:
this may help
var win=window.open();

 win.document.write('<html><body><b>Helloworld</b></body></html>') 

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now