|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
Functionality Basic
The Company Toolbar is a standard CSS2 compatible HTML browser! It can execute scripts, applets, ActiveX controls (<SCRIPT>, <APPLET>, <OBJECT>) which makes the toolbar very universal.
Extendet
Every HTML document loaded by the toolbar is scanned for <META name=”TT_TOOLBAR”…> tags. Those META tags tell the toolbar DLL to start operating in ‘extended’ mode. For example if the HTML document is to be registered as client/consumer for specific events the HTML document sent to the toolbar has to contain the following element: toolbar.GetVersion() returns string with the following format: “MAJ.MIN”, where MAJ and MAN are numbers, the current version is “2.00” toolbar.BrowserGoto( url ), the parameter url is a string: redirects the browser to the given url. toolbar.BrowserGoto( url, target ), both parameters are string: redirect given ‘frame’ to the given url. Valid are also the reserved: “_blank”, “_self”… etc. NOTE: upon request additional methods can be included in the object toolbar in the DLL. Normally the implementation of the function OnToolbarConnect() should save the object ‘toolbar’ in a global variable, which can be called by other JavaScript functions. Example implementation: <SCRIPT language="JavaScript" type="text/javascript"> // global variable definitions // ********************************** var TBar; ... // toolbar event handlers // ********************************** function OnToolbarConnect( toolbar ) { TBar = toolbar; ... } ... This function is called before the browser starts to load any document. The input parameters contain information about the document which is to be loaded by the main browser. URL contains the url of the document which is to be loaded; header contains an additional header, if it is to be sent to the server (for example when forms are posted); target contains the target frame where this document is to be loaded by the browser; post is the HTTP method. NOTE: this function can return FALSE, which means that the browser request will be cancelled. This function can be used for the following purposes: This function is called when the main browser is done with loading a new document. The input parameters include the url of the document and the document itself. NOTE: the input parameter ‘document’ is a valid object! The function can be used for the following purposes: This function is called when in the main browser a new document is loaded and this document contains meta tags with the name “tt_toolbar”: <META name=”TT_TOOLBAR”…>. The parameter url is the url of the loaded document; the parameter meta is the context of the <META …> element. The function can be used for the following purposes: Example: in the current realization of the sample toolbar server the function onBrowserMeta is defined in the tsToolbar.htm template. The body of this function is: function OnBrowserMeta( url, meta ) { if ("refresh" == meta) { document.location = "/servlets/servlet/toolbar"; } this forces the toolbar to refresh itself if the meta parameter is equal to “refresh”. Similarly one can define context dependent toolbars (i.e. when the toolbar user browses “special” documents which contain TT_TOOLBARMETA tags which tell the toolbar to load a different document. The function is called when in the browser the loading of a resource is completed. The function can be used for the following purposes: This function is called when java script function in the document in the main browser calls a java script function in the toolbar upon an event in the main browser. For more information see the implementation of the method toolbar.Event(code, action, data1, data2 ). The function can be used for automation between java scrip functions in the main browser and in the toolbar.
|
|||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||