Create Notification

1 reply · opened May 13, 2018

JjdmannMay 13, 2018

Hi, how does one create a notification, like the one used by the contact form? What are the steps needed for that?

I see in the contact form PHP code that there is a response with two fields, "alert" and "message". (i.e., status is "success" or "error").

I haven't gotten this to work outside of the contact form yet, but would like to use these alerts in other places in my application. I'm currently sending back a JSON response using the same "alert" and "message" fields, but perhaps I'm missing a snippet of HTML or some other file, because I'm not getting any messages.

Thanks!

Jonathan

SSemicolon WebSTAFFMay 28, 2018

Hello,

Can you please provide us with a Live URL so that we can check what is going wrong with this. Additionally, you can consider using the following code:

HTML:

 Welcome to Canvas Demo!'>

JS (Simply run this code on any jQuery Event like Click/Hover/Focus/Document Ready/Window Load etc. Add it after the js/functions.js File):


SEMICOLON.widget.notifications( jQuery('#custom-notification-message') );

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard