IWCTrigger: Calling a Maintain Function From a Script Handler

How to:

The IWCTrigger function can be used in two ways:

IWCTrigger can be used in JavaScript or VBScript. IWCTrigger is a Maintain Data-supplied script function for use in any Maintain Data application.

Syntax: How to Call a Maintain Function From a Script Handler

IWCTrigger("functionname"[, "parm"]

where:

functionname

Is the Maintain function to call. Scripts are case-sensitive, so you must specify the name using the same uppercase and lowercase letters that you used to name the function in the Maintain Data procedure.

parm

Is a parameter being passed to the function.

Syntax: How to Retrieve a Parameter From the Called Function

						formname.Triggervalue

where:

formname

Is the name of the form in the Maintain Data application.

Syntax: How to Pass the Value of an ActiveX Control Property to a Maintain Function

IWCTrigger ("function",document.form.control.property);

where:

function

Is the Maintain function you are calling.

form

Is the name of the form on which the ActiveX control is located.

control

Is the name of the ActiveX control.

property

Is the name of the ActiveX control property (look for ActiveX control properties in the ActiveX tab of the property sheet for the ActiveX control).

Example: Passing an ActiveX Control Value to a Maintain Function

If you have an ActiveX calendar control on Form1 that has a property called Month, you can use IWCTrigger to send the value of Month to a Maintain function called UpdateDate, via either JavaScript or VBScript:

IWCTrigger("UpdateDate",document.Form1.CalendarControl.Month);