Re: Can I call a Javascript function using a BHO
- From: "Conanc" <conanc@xxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 18:08:09 -0800
I've used the execscript a long time ago.
Snippet from
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1378883&SiteID=1
CComPtr<IDispatch> spDisp;
spDoc->get_Script( &spDisp );
CComQIPtr<IHTMLWindow2> spWin = spDisp;
VARIANT pvarRet;
HRESULT tt =
spWin->execScript(_bstr_t("alert(1)"),_bstr_t("JavaScript"),&pvarRet);
Substitute your own method name.
- conan
"Angus" <nospam@xxxxxxxxx> wrote in message
news:uNc5SiVZHHA.2432@xxxxxxxxxxxxxxxxxxxxxxx
Helloviewable
I am writing a BHO to automate some web processes. I want to call a
javascript function. Reason is the web page I want to open is not
on the web page I am automating. There is no link to it.
If I click on the links that are on the page you see this sort of thing:
javascript:OpenWindow("servername","Form_to_Open",2,1);
Can I call this javascript function using the browser object model? If so
how? Any direction would be much appreciated.
If I substitute the above javascript for:
javascript:OpenWindow("servername","Another_Form_to_Open",2,1);
Then should that work too?
Angus
.
- Next by Date: Is it possible to enumerate all javascript scripts on a web page?
- Next by thread: Is it possible to enumerate all javascript scripts on a web page?
- Index(es):
Relevant Pages
|
|