JavaScript to display generated source in new window.

[cc lang=”javascript”]
function newWin() {
ven = window.open(”, ‘_blank’);

var results = document.documentElement.innerHTML;

var match = “<"; var re = new RegExp("<", "g"); var newresults = results.replace(re, "<"); ven.document.write(newresults); } [/cc] From: http://weblogs.asp.net/mspedding/archive/2003/10/10/31462.aspx

Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.