Click to See Complete Forum and Search --> : complete source of document object?


oleo
11-18-2003, 06:57 AM
Is there a way to retrieve the COMPLETE source code of a document?? i.e. the current document or the document inside an IFRAME? if I'm not supposed to use document, which object must I use?

I need the complete source of a given IFRAME copied onto a hidden form value and posted to a saver-function.

HELP-HELP-HELP!!!

Khalid Ali
11-18-2003, 07:11 AM
you can use something like this.

var root = document.getElementsByTagName("html")[0];
alert(root.innerHTML)

root.innerHTML will have all the source in it,excluding HTML tags