...

View Full Version : A way to dynamically view a live source of a .html page??



glz
08-26-2007, 01:52 AM
Many ajax and javascript functions change the innerHTML of elements in the source, writing and rewriting things in the source

You can run any javascript function or action you want that would change the source, but when you view it, it will always show the original source before a JS function changed it

Is there a way to view the changed source after each time a JS functoin changes it??

for example:
<span id="whatever">This is the original source code</span>

then you may run this piece of JS:
whatever.innerHTML= 'Changed source code!';


but when you right click and press 'view source"
you will always get this:
<span id="whatever">This is the original source code</span>

I want to get the changed source code, maybe its possible to write the changed source code to another file, or use some kind of HTTP prog to read the changes on an html page???

Any help appreciated thanks

eak
08-26-2007, 02:06 AM
try this:

alert(document.body.innerHTML);

rwedge
08-26-2007, 03:03 AM
The Firebug (https://addons.mozilla.org/en-US/firefox/addon/1843) plugin for FireFox does what you are looking for.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum