That's Nick Bradbury's code (http://www.bradsoft.com/), not mine. :)
Dave Murray Glasgow, UK PGP KeyID: 0x838592B3
Remove NOSPAM from my email address to reply.
Tom Peters wrote:
View Source Code - Awesome code, but doesn't give you the stuff outside of the <html> tag:
------- Additional Comment #2 From irongut 2004-12-06 18:41 ------- View source workaround:
I worked around this by looking for the <html> tag and returning the innerHtml from it, like this:
Var elm : IHTMLElement; iCol : IHTMLElementCollection; iDoc : IHTMLDocument2; i, nLen : integer; Begin Result := ''; iDoc := IHTMLDocument2(FBrowserMZ.Document); // first extract body, in case html scan fails below elm := iDoc.body; if Assigned(elm) then Result := elm.innerHTML; // now extract collection of all elements, then scan for <html> iCol := iDoc.all; if Assigned(iCol) then begin nLen := iCol.length; for i := 0 to nLen - 1 do begin elm := IHTMLElement(iCol.item(i, varEmpty)); if SameText(elm.tagName, 'html') then begin // found <html>, so extract html source and exit Result := elm.innerHTML; exit; end; end; end;
_______________________________________________ mozilla-embedding mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-embedding
