Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
Have you ever wanted to view the generated page's source rather than the actual source? What do I mean? Like say there's a script which writes out source to be displayed - and you want to see it's output. Well then, here's a trick invented by my JavaScript guru of a dad.

Create a Internet shortcut in your favorites with the following (make sure it's just 1 line):

Quote:
Code
javascript:var myWin=window.open("","myWin","width=800,height=600,scrollbars,resizable");
var myStr=document.documentElement.outerHTML;
myStr=myStr.replace(/\</g,"<").replace(/\>/g,">").replace(/\r\n/g,"
");
myWin.document.open();
myWin.document.write(myStr);
myWin.document.close();


Then anytime you want to see a page's genereated source, click on that favorite and a page will popup with it.


Domain Registration, Hosting, Management
http://www.dollardns.net
Sponsored Links
▼ Sponsored Links ▼ ▲ Sponsored Links ▲
Joined: Apr 2002
Posts: 212
Member
Member
Joined: Apr 2002
Posts: 212
Good stuff!!!!! smile

Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
Finally SOMEBODY appreciates this little tool. wink


Domain Registration, Hosting, Management
http://www.dollardns.net
Joined: Mar 2002
Posts: 562
UGN Supporter
UGN Supporter
Joined: Mar 2002
Posts: 562
I couldnot get this to work.... frown

Quote:
Create a Internet shortcut in your favorites with the following (make sure it's just 1 line):


I could not fit this in the space allowed, frown

Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
Try this:

Create an internet shortcut to anything you want. Go to the shortcut and right-click and hit properties. Paste the following to replace the original URL. Click Ok.

Quote:
Code
javascript:var myWin=window.open("","myWin","width=800,height=600,scrollbars,resizable");var myStr=document.documentElement.outerHTML;myStr=myStr.replace(/\</g,"<").replace(/\>/g,">").replace(/\r\n/g,"
");myWin.document.open();myWin.document.write(mySt r);myWin.document.close();


Domain Registration, Hosting, Management
http://www.dollardns.net

Link Copied to Clipboard
Member Spotlight
None yet
Forum Statistics
Forums41
Topics33,840
Posts68,858
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
unreal 1
Crime 1
Ice 1
Dartur 1
Powered by UBB.threads™ PHP Forum Software 8.0.0