Call javascirpt from IE Toolbar and dynamic resizing
hii all
i have developed a toolbar for IE using C#. The toolbar is actullay a BHO.
1) I want to dynamically resize the toolbar on button click.
2) I want to add javascript snippets to the code behind.
3) how to call ondocumentcomplete from toolbar?
Any help regarding the same will be highly appreciated.Thanks in advance.
Hi,
1. If your toolbar has been implemented properly it should resize automatically when a user double-clicks on its chevron (the '|' on the lhs of the toolbar). Check that you have not selected 'Lock Toolbars' from the Toolbar context menu.
2. The usual method is to use MSHTML.dll to alter the DOM of the current document or to inject a script block into the current document.
3. ondocumentcomplete is an event of the browser, not a method of a toolbar/bho. On ISetSite you should obtain a reference to the browser object and from that the current document.
MSDN documentation - http://msdn2.microsoft.com/en-us/library/aa969320.aspx