Altova Authentic 2024 Browser Edition

Events: Toolbar Button

Home Prev Top Next

Each toolbar button has default behavior, which may need to be changed. The AuthenticCommand event allows you to add additional tasks to, or entirely redefine, the default behavior of toolbar buttons. Scripts can use the AuthenticCommand event to receive notification each time the user clicks a toobar icon. Note that not every command (from the Authentic.UICommands collection) has its own associated event. To find out which icon the user clicked, the script has to check the AuthenticEvent.srcElement property, which contains a reference to a corresponding AuthenticCommand object.

 

Example

 

 // event handler for OnDocEditCommand

 <SCRIPT LANGUAGE=javascript FOR=objPlugIn EVENT=doceditcommand>

         // we are interested in the k_CommandSave button

         if(objPlugIn.event.srcElement.CommandID == 1)

         {

                 // instead of the standard HTTP PUT we want to use

                 // a HTTP POST

                 objPlugIn.SavePOST();

 

                 // no standard execution follows

                 objPlugIn.event.cancelBubble = true;

         }

</SCRIPT>

 

Reference

For available commands, see AuthenticToolbarButton.CommandID.

 

© 2018-2024 Altova GmbH