Please enable JavaScript to view this site.

Altova Authentic 2020 Browser Edition

User Reference > Mechanisms

Events: Adding Event Listeners (Firefox-specific)

Scroll Home Prev Top Next More

For each connection point event Authentic Browser provides (see also Events: Reference) you can write event handlers in the SCRIPT blocks on your HTML page by using the addEventListener method.

 

Note:The description in this section applies to Firefox only.

 

Here is an example of how to provide an event handler for the SelectionChanged event in Firefox:

 

 

SelectionChanged

The SelectionChanged event is triggered each time the current selection in the view changes. Use a SCRIPT block to execute your event-specific code.

 

<SCRIPT LANGUAGE="javascript">

var selCount = 0;

function OnSelectionChanged()

{

 selCount = selCount + 1;

 selectionCounter.value = "SelectionCount = " + selCount;

}

var objPlugIn = document.getElementById('objPlugIn');

objPlugIn.addEventListener("selectionchanged", OnSelectionChanged, false)

</SCRIPT>

 

 

Please note that the Authentic.event object is not populated when this event occurs. If event handlers are registered in your script, the Authentic.event object properties contain values from the last event to have occurred. The Authentic.CurrentSelection object now contains valid information.

 

© 2020 Altova GmbH