From a Nexaweb Ajax application UI file, select Client Code (MCO) and Add new handler on the Select Handler dialog and click Next. The JavaScript MCO dialog appears.
1. Complete the JavaScript MCO dialog as follows:
|
|
MCO ID: Nexaweb Studio automatically specifies the ID for the JavaScript MCO as jsMCO. Specify a unique ID for this MCO by editing the provided ID or creating your own. Source Folder: Nexaweb Studio stores JavaScript MCOs in the WebContent\src-js directory by default. File name: Nexaweb Studio automatically specifies the file name for a new JavaScript MCO as jsMCO incremented by 1 for each MCO created for a Nexaweb Ajax project. Specify a unique file name for this MCO by editing the provided ID or creating your own. |
Click Next.
The Manage Client Object Method dialog appears.
2. Complete the Manage Client Object Method dialog as follows:
|
|
Function name: Specifies the event type that this MCO handles. Configure the parameters for the request: Add or remove parameters for this event handler. Click Add to create a new entry in the name\value list. Click on an entry in the list and click Remove to delete it. To change the order of parameters, click on a parameter in the list and then click Up or Down. |
Click Next.
A Completed dialog appears, displaying a summary of the MCO you created to handle an event:
3. Click Finish.
Nexaweb Studio adds the MCO file to this project's WebContent\src-js directory in the Navigator view.
The syntax of this handler appears in the Handler column of the event for which you created it on the Manage Component Events dialog.
The MCO appears in the Outline view, and the event appears in the Outline view under events for the component to which you assign this handler to an event.
Click Close to close the Manage Component Events dialog when you finish adding event handlers.