Web Component: j-Message
j-Message
singleton
easy usage
jComponent
v19|v20
Configuration:
button
{String}
a button label (default:OK
)style
{Number}
can change a style (default:1
), style2
is similiar toj-Approve
componentcloseoutside
{Boolean}
enables closing of message box by clicking outside of main button
Usage:
SETTER('message/warning', 'Some warning');
SETTER('message/success', 'Some success message');
SETTER('message/info', 'Some info message');
Works with ASETTER:
- errors are handled automatically
// Without callback
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Profile has been saved successfully'));
// Or with a callback
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Profile has been saved successfully', function(response) {
console.log(response);
}));
// Or with a callback and without message
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', function(response) {
console.log(response);
}));
// With auto-binding
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', '?.response'));
AJAX('POST /api/profile/', userprofile, ASETTER('message/response', 'Your message', '?.response'));
Author
- Peter Širka petersirka@gmail.com
- License
Created
22. february 2016
Updated
30. january 2024
jComponent library
19 | 20
Version
v1
License
https://www.totaljs.com/license/
Dark mode
Yes
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com