sc_redir(Application, Parameter01; Parameter02; Target, Error, height_modal, width_modal)

This macro its used to redirect the processing to other application or URL.


If the redir uses parameters, these must be passed in the following format:
1) After the name of the application, use the comma delimiter (,) then
2) = (equal sign) .
3) More than one parameter, must be separated by semicolon (;)
4) The target determine which application is opened (default=_self): _self, _parent, _blank or modal.
5) Optional parameter to set error messages redirection in the application: "F" redirects if there is error in the application (default value) and "E" does not redirect.


OBS. If your connection uses transaction control the use of this macro on the events onAfterInsert, onafterupdate, onAfterDelete, onBeforeInsert, onbeforeupdate or onBeforeDelete should come after the use of macro sc_commit_trans so this way it will save the form changes.



Ex. 1: Application without parameters nor target.
if ([global_user] == "test")
{
sc_redir(application_x.php);
}

Ex. 2: Application with parameters and without target.
if ([global_user] == "test")
{
sc_redir(application_x, parm1={var_test}; parm2="xxx");
}

Ex. 3: Application without parameters and with target.
if ([global_user] == "test")
{
sc_redir(application_x, "", "_parent");
}

Ex. 4: Application with parameter and target.
if ([global_user] == "test")
{
sc_redir(application_x, parm1={var_test}; parm2="xxx", "_blank");
}

Ex. 5: URL.
if ([global_user] == "test")
{
sc_redir(http://www.my_page.com);
}

OBS. Everthing that was passed as parameter to the called application will be avaliable as global variable.

EX: sc_redir(employee.php, parm1={var_test}; parm2="xxx", "_blank");

In the employee.php application the parameters will be acessible at [parm1] and [parm2]