sc_ajax_message("Message", "Title", "Parameters", "Parameters_Redir", "String_toast");
|
|
This macro allows the application to show customizable messages. Its use is restricted to AJAX events of Form/Control applications.
This macro is only available in applications with AJAX support.
| Parameters |
Description |
| Message |
The message to be shown. This parameter is required. |
| Title |
Messagebox title, if this parameter is empty, the title will not be shown. |
| Message Parameters String |
Message format parameters. Ex.: modal=Y&button=Y&button_label=Ok&redir=form_employees.php&redir_target=_blank
For more details about this parameter, see Table2.
|
| Redirecting Parameters String |
In this section is possible to define values for the redirecting target application. This parameter works only if a "redir" property was informed. The properties for this parameter must be informed in this format: parameter=value;parameter=value.
Ex.: customer_id=ALFKI;customer_name=ALBERT FRANCINET
|
| Toast parameter string |
Message formatting parameter using Toast.
- toast: Y or N
- toast_pos: 'top', 'top-start', 'top-end', 'center', 'center-start', 'center-end', 'bottom', 'bottom-start', 'bottom-end'
- type: 'warning', 'error', 'success', 'info', 'question'
|
Table2: Message Parameters String
| Property |
Description |
Values |
Example |
| modal |
Flag to define if the message will be shown in modal |
Y or N |
modal=Y |
| timeout |
Time in seconds to hide the message. If this property is not informed, the message will be shown indefinitely. This property works only if "button" property is not enabled. |
Seconds |
timeout=5 |
| button |
Shows a button inside the message. This button default function is to close the message. If there is redirecting enabled, the application will be redirected after closing the message. |
Y or N |
button=Y |
| button_label |
Button label. This option works only if the "button" property is enabled. |
String |
button=Y&button_label=OK |
| top |
Message positioning value in pixels from top margin. |
Pixels Number |
top=300 |
| left |
Message positioning value in pixels from left margin. |
Pixels Number |
left=200 |
| width |
Messagebox width value in pixels |
Pixels Number |
width=320 |
| height |
Messagebox height value in pixels |
Pixels Number |
height=30 |
| redir |
URL or application name for redirecting. This macro works only if the "button" property is enabled. |
String |
button=Y&redir=form_employees.php |
| redir_target |
Target for redirecting. This property works only when the "redir" property is enabled. |
String |
redir=form_employees.php&redir_target=_blank |
| show_close |
Flag for exhibition of the "close" button on the messagebox title bar. When activated, this parameter forces a title bar to be shown, even if there is no title defined. |
Y or N |
show_close=Y |
| body_icon |
Flag for exhibiting a icon on the message body. The icon exhibition depends on the applications theme configuration (exhibition schemes). |
Y or N |
body_icon=N |
Example 01
sc_ajax_message ("Message", "Title", "timeout=0");
Example 02: Using Toast
sc_ajax_message ("Client", "Title", "toast=Y&toasto_pos=center-start&type=success");
To display the message using Toast, this option must be enabled in the application interface.
|
Macro Scope
|
Blank application
|
calendar application
|
Grid application
|
Form application
|
Control Form
|
| allMacros
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros
|
ajaxFieldonClick
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros
|
|