xforms-onbeforezoom |
This event is fired before the zoom page is opened.
Event Information
To invoke |
Bind a HTML control to the zoom. Open the zoom page and select the data that should be passed as zoom data. |
Default Action |
Sets the data that is necessary to be passed to the zoom page, and initiated any action associated with the event. |
Named Script |
xforms-onbeforezoom |
Event Object Properties
Property |
Description |
---|---|
callBack |
Sets or retrieves the pointer to a function that gets called when an XForm is completely loaded through the Zoom behavior. |
srcElement |
Denotes the object that fired the event. This points to the HTML control that initiated the zoom action and not the image from which the zoom is invoked. |
data |
Object that denotes the data that can be passed to the zoom page. This has to be an object and cannot be a string data. |
applicationDefinition |
Object that denotes the application definition of the zoom page that is opened. |
returnValue |
Boolean that determines whether the zoom action can be cancelled
|
cancellable |
This has been DEPRECATED. Use returnValue instead. Boolean that determines whether the zoom action can be cancelled or not.
|
An event handler can access the event object and its properties through the eventObject available as a parameter on the handler.
Remarks
The data object that is to be passed to the zoom page should be a data object and cannot be a string value.
Example
This sample code demonstrates the event:
function controls_BeforeZoom(eventObject) { var data = new Object(); data.textValue = 1; //Manipulate the application definition to open the page as a non-model window var frameNode = cordys.selectXMLNode(eventObject.applicationDefinition,".//*[local-name()='frame']"); // frameNode.text can take the values: main, left, right, sub, leftSub, rightSub , header, and footer. cordys.setTextContent(frameNode,"main"); //setting caption cordys.setTextContent(cordys.selectXMLnode(eventObject.applicationDefinition,".//*[local-name()='caption']"),"Zoom Page"); eventObject.data = data; }