sc_ajax_javascript( 'JavascriptMethodName', array("parameter"))

This macro allows the execution of JavaScript methods called from some events fromĀ form, control, and calendar applications.

To use this macro you need to create a javascript method in the Programming settings.


This macro receives two parameters:

The firs parameter (required) receive the javascript method name.
The second (optional) receive an array with the method parameters on it.


Examples:

Ex. 1: Method javascript without parameters:
sc_ajax_javascript('method_name');
sc_ajax_javascript('sum');

Ex. 2: Method javascript with a parameter:
sc_ajax_javascript('method_name', array("parameter"));


Ex. 3: Method javascript with two parameters:
sc_ajax_javascript('method_name', array("param1","param2"));

Example using global variables:
sc_ajax_javascript('sum', array([num1],[num2]));