How to: |
The IWCTrigger function can be used in two ways:
If you use IWCTrigger in a script library, ensure the Maintain function you are calling is in the same procedure in which you are using the script library.
IWCTrigger can be used in JavaScript or VBScript. IWCTrigger is a Maintain Data-supplied script function for use in any Maintain Data application.
IWCTrigger("functionname"[, "parm"]
where:
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.
Is a parameter being passed to the function.
formname.Triggervalue
where:
Is the name of the form in the Maintain Data application.
IWCTrigger ("function",document.form.control.property);
where:
Is the Maintain function you are calling.
Is the name of the form on which the ActiveX control is located.
Is the name of the ActiveX control.
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).
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);