Prakul

I have created a Browser Plugin which handles onDocumentComplete event. It works fine on HTML pages.

But if I open a html page (let's say google.com), and then open another page having an activeX control, then once I close this activeX page, then my old page, google.com hangs.

Please let me know how to handle Browser Plugin for html pages having ActiveX controls.

Regards,
Prakul.



Re: Internet Explorer Extension Development BHO fails on pages having activeX control

IECUSTOMIZER

Hi,

More information please. What type of Browser Plugin Toolbar or BHO

Do you have any other Toolbars or BHO's running when your extension is running Use the Addons Manager to disable any other toolbars and BHO's that you have installed and test your extension by itself.

Regards.






Re: Internet Explorer Extension Development BHO fails on pages having activeX control

Prakul

Thanx for replying Rob.

I have added an item in Default context menu say "CLICK ME". On the click of this menu option I have executed a javascript which opens a new browser window using window.open function. I have also created a browser plugin which appends simple HTML tags in the end of the doc.

Reproducing Steps :

I open an IE browser with blank page. RIght click on the page, and choose "CLICK ME" option from the context menu then the script executes :

Case 1:
If i call Window.Open("www.google.com", "MYWINDOW", ""); A new window opens and it also contains the HTML tags at the bottom of the page. If I close this window, then everything work as expected.

I again repeat the process, everything works smoothly and as expected.

Case 2:
If I call Window.Open("http://localhost/myPage.html", "MYWINDOW", "");
This myPage.html has activeX control.
A new window opens and it also contains the HTML tags at the bottom of the page. If I close this window, then the blank page (from which "CLICK ME" context menu option was clicked) hangs. And this behaviour is consistent and is easily reproducable.

If I remove the browser plug-in then everything behaves normally.

In Browser Plugin I have written simple HTML tags on HTMLDocument object on webbrowser_documentComplete event.

Observation:
The myPage.html behaves abnormally when browser plug-in tries to play with mshtml.HTMLDocument object.

One more thing, If I open this myPage.html directly from web browser, then everything works fine.

Please let me know if you have any thread to solve the problem. I will let you know if I find something new.

Regards,
Prakul




Re: Internet Explorer Extension Development BHO fails on pages having activeX control

IECUSTOMIZER

Hi,

In myPage.html in which you are hosting your ActiveX control, does the control load activated. ie. do you need to "Click to Activate this Control' prompt

For your intranet zone, have you enabled Scripting of ActiveX controls What does your ActiveX control do It seems that the problem resolves to your ActiveX control not returning focus back to its opener. Does this occur when you open a public site with ActiveX controls with your context menu

Typically for context menu scripts that open a new window you would use something like this...

Code Block

<script language=javascript defer>
var str = new String ("toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes, resizable=yes, top=0, left=0");
str = str + ", width=400, height=" + (screen.height - 100);
var dlProgress = window.open ("", "mywindow", str);
dlProgress.document.open();
dlProgress.document.writeln ("<html>");
dlProgress.document.writeln ("<head>");
dlProgress.document.writeln ("<title>" + external.menuArguments.document.title + " Properties</title>");
dlProgress.document.writeln ("</head>");
dlProgress.document.writeln ("<script language=javascript>function Documentclick(){if (event.button==2){alert(\"Hello World\");}}document.onmousedown=Documentclick<\/script>");
dlProgress.document.writeln ("<body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>");

................................

dlProgress.document.writeln ("</body></html>");
dlProgress.document.close();
dlProgress.document.my_parent = external.menuArguments;
dlProgress.document.document.location.href={web address to your page}

NOTE: dlProgress.document.my_parent = external.menuArguments; sets the parent window back to the window in which the context menu was selected.

Regards.






Re: Internet Explorer Extension Development BHO fails on pages having activeX control

Prakul

Hi Rob,

1. Yes, I need to click on the activeX control to activate it.

2. Yes, I have enabled all the ActiveX scripting in Internet and Interanet zone.

3. For testing purpose, I have created a blank ActiveX control.

4. I have not tried with a public site having ActiveX control, I will definitely try and will let you know.

5. I copied your code, but still it didn't work. Is this code producing positive results at your end, because in my case it is the same behaviour.

Please try it at your end, and let me know if you could think of someother solution.

Regards,
Prakul.




Re: Internet Explorer Extension Development BHO fails on pages having activeX control

Lev123

Hi Prakul,

I am searching an Example for Browser Plugin which handles onDocumentComplete event.

Can you please explain How it is developed.Because I am new to c# I dont have any idea about

how to develop BHO.

Thank you

Lev123





Re: Internet Explorer Extension Development BHO fails on pages having activeX control

Prakul

Hi Lev,

You can go through following links...

http://www.15seconds.com/issue/040331.htm

http://www.codeproject.com/useritems/Attach_BHO_with_C_.asp

Regards,

Prakul.





Re: Internet Explorer Extension Development BHO fails on pages having activeX control

Lev123

Thank u Prakul