FindTextInPage in a IE publication - SOLVED

I’m having issues in using FindTextInPage in a IE publication, HE 4.6.1. I do not receive any errors when using the code below, basically it acts like nothing has happened. To verify that the variable is passed correctly, I included the MessageBox, which popups “test” in the Message Box as expected, when uncommented.

Are there any issues in using FindTextInPage in a IE publication or am I using the wrong syntax? Also, I am assuming, that this would give me the same find dialog box, as if pressing the [Ctrl]+[F] keys and enter the search string in a IE publication. Is that correct?

Thanks,

Javascript code
mData="test";
window.external.RunHEScriptCom('CustMain.dispFind|'+mData);  

HE function code
function dispFind(Sitem: String);
begin 
//MessageBox(Sitem, "Test Var", MB_OK+MB_ICONINFORMATION);
FindTextInPage(Sitem, false, false);
end;

FindTextInPage actually highlights text. It doesn’t display the find dialog box.
ShowFindDialog will do it. http://www.htmlexe.com/help/scriptreference

I was going to try the ShowFindDialog but backed off since it stated it was for HTML Viewer Publications only, in the manual.

I will check it out.

Thanks,

No it will work with IE publications too. The online manual has been updated for clarification.

I have tried the following using both, as a function and a procedure. I also replaced Sitem with “text” and each time, the Find dialog box comes up fine, however the text area is blank. I can manually enter “text”, without the quotes and all the words are highlighted as expected. For some reason, it’s seems like the variable isn’t passed at runtime, even as a direct string, as in #2, below.

Any ideas?
Thanks,

Javascript code
mData="test";
window.external.RunHEScriptCom('CustMain.dispFind|'+mData);  

Tried as function and a procedure
procedure dispFind(Sitem: String);
begin 
ShowFindDialog(Sitem);    //1. Tried this and the next line one at a time
ShowFindDialog("test");   //2. Both bring up the dialog box and the Find text area is blank with both tries
end;

The parameter is ignored in IE publications, it is only for HTML viewer publications.
The Microsoft Webbrowser control doesn’t have a way to pass data to the Find dialog.

Thanks for the clarification.