Need help about BHO

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




Answer this question

Need help about BHO

  • Gouri

    I don't have much experience w/ BHO, but I do have experience doing web dev. These comments may not apply since you're using BHOs, though...

    Are you sure that your test() method is showing up from your BHO My first guess would be that you're not quoting correctly. This is assuming that your BHO writes javascript via document.write().

    IE, if your BHO executes
    document.write("<script language="javascript"> function test(){alert('this is my BHO alert');}</script>");
    to get the script in there, you'll need to change the quote method for your language tag, or not quote it at all.
    document.write("<script language='javascript'> function test(){alert('this is my BHO alert');}</script>");
    or
    document.write("<script language=javascript> function test(){alert('this is my BHO alert');}</script>");

    You can also test whether the script is available by typing test();" in your address bar. This will try to execute a method in your current document named test.


  • Need help about BHO