Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewing document after modifying using DOM 1

Status
Not open for further replies.

MontyBurns

Programmer
Oct 3, 2001
99
0
0
GB
Hi,

If I use client side JS to modify my page, and I want to know what the source is (for debugging etc) at any one time, is there any way I can view this? View Source only returns the document as it was initially sent, as far as i'm aware.

Suppose I could write a script to display it, but i'm guessing there must be an easier way, such as a freeware app?

Thanks,
Burns
 
I have this same question, but no one posted an answer...

Does someone have an answer?
 
how are you modifying your page? If you re-write it through scripting, you have a new page visible through view source like any other page.

is that what you mean?
sd
 
Yes, I'm using "document.write(...);" statements. However, these sections are executed conditionally, so (if they are writing the same text in two different places) I'm not sure (sometimes) exactly which statements were actually processed.

However, when I "view source", I still see all the "document.write(...)". What I'd like to see is the actual HTML that is rendered (i.e., the contents of my "
Code:
document.write
".
 
When you do view source or even save the web page, I belive it will only show the data passed to the client, not any changes to the page done at the client end. I have the same problem with appending cloned nodes to a table.
 
type this into the address bar:
Code:
javascript:d=window.open();d.document.open('text/plain').write(document.body.outerHTML);

-pete
 
Thanks a million! That's what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top