Hi all,
We are developing a BHO that write some javascript code in a web page onDocument Complete Event() as shown below.
------------------------------------------------
<Script Language="javascript">
function test()
{
alert('this is my BHO alert');
}
</Script>
<Div onClick="test();"></Div>
---------------------------------------------------
Problem is this dear brothers that when i click on div then "test();" method is not call and message box shows object expected , where as we define the test method in above javascript code.
So please help,
Best Regards,
Qaisar Mughal

Help about BHO
Graham Byrne
It helps to have some text to point where the div is located.
As for the document complete,
<Script Language="javascript">
function test()
{
alert('this is my BHO alert');
}
</Script>
From outside the browser:
WebBrowser1.Document.GetElementsByTagName("DIV").Item(0).Click();
or
System.Windows.Forms.HtmlElementCollection Div = WebBrowser1.Document.GetElementsByTagName("DIV");
Div(0).Click();
Obviously, if you have more than one DIV, you need to ID the one you want to call and change the syntax to GetElementByID.
HTH