View Full Version : How to send the source of current page?

12-26-2005, 07:23 AM

Is it possible to send the source of the current page loaded (that the sctipt is on) to, say.. a php script via POST method?

What I was originally wanting to do was see if there was a way to "grep" a specific part out of the loaded page and send that value, but I think that would be too much of a pain for me to figure out and may be easier if I can just send the whole source and deal with it there.


12-26-2005, 06:22 PM
var source = (typeof window.XMLSerializer == "undefined")? document.documentElement.outerHTML : (new XMLSerializer()).serializeToString(document);

// now send source variable via ajax