viewing generated javascript

Posted by: olosoft

viewing generated javascript - 07/13/02 06:59 PM

this pertains mainly to SR, unless any of you remember, what was that little bit of code that your dad came up with that you put in your favorites to view the actual generated html of a site?
Posted by: SilentRage

Re: viewing generated javascript - 07/15/02 01:45 PM

Code:
javascript:
var myWin=window.open("","myWin","width=800,height=600,scrollbars,resizable");
var myStr=document.documentElement.outerHTML;
myStr=myStr.replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\r\n/g,"
");
myWin.document.open();
myWin.document.write(myStr);
myWin.document.close();
I broke it up into several lines for readability, but of course you'll have to stream it into one line to create that favorite.
Posted by: olosoft

Re: viewing generated javascript - 07/15/02 09:17 PM

ah, thank you very much mr. rage