Web component: j-Message


  • Info
  • HTML
  • JS
  • CSS
  • Meta

j-Message

  • singleton
  • easy usage

Configuration:

  • button {String} a button label (default OK)

Usage:

SETTER('message', 'warning', 'Some warning');
SETTER('message', 'success', 'Some success message');
SETTER('message', 'info', 'Some info message');

Great for AJAX responses:

This component implements FUNC.messageresponse function and you can use it in AJAX:

// FUNC.messageresponse(success_message, [success_callback]);
AJAX('GET /api/something', FUNC.messageresponse('Profile has been saved successfully'));

Author

Browser‘s Save action performs Preview