I needed to d/l new mozilla version and use MSHTML_TLB instead of MSHTML..
function TForm1.SearchText(aText: string):Boolean; var document: IHTMLDocument2; begin SearchText := false;
document := WebBrowser1.Document as IHTMLDocument2;
if Pos(aText, document.body.innerText) <> 0 then
begin
SearchText := true;
end;
end;On Thu, 11 Dec 2003 14:36:47 -0800, Johnny Stenback <[EMAIL PROTECTED]> wrote:
Patrick Deuster wrote:Heya all :) I need check if a specified text is on a website.
With TWebBrowser i did:
function TForm1.SearchText(aText: string):Boolean;
var
i: Integer;
begin
SearchText := false;
for i := 0 to WebBrowser1.OleObject.Document.All.Length - 1 do
begin
if Pos(aText, WebBrowser1.OleObject.Document.All.Item(i).InnerText) <> 0 then
begin
SearchText := true;
end;
end;
end;
How can i code a function like this that works with TMozillaBrowser? Everytime i try the funtion above it tells me "Library not registered"
Not sure if this is your problem, but Mozilla doesn't support Document.All, you'll need to use the standard DOM interfaces to iterate through the DOM nodes, not proprietary IE ones.
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ _______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
