I'm trying to replace the standard system alert with something prettier, and thought I would give Alertify a try. The behavior is not as expected, the alert box appears on screen for only a second before disappearing.
I'm not sure what I'm doing wrong?
Function:
function confirmation() {
alertify.alert("here is a message")
}
HTML:
<asp:Button ID="SubmitButton" runat="server" CausesValidation="True" CommandName="Insert" CssClass="formButton" Text="Submit" OnClientClick ="confirmation();"/>
Any assistance would be greatly appreciated.
Make sure you're loading all the required files as shown on AlertifyJS Getting Started section and further instructions on the alert() docs.
Here's a working example:
AlertifyJS is awesome, I've used it in many projects. Make sure you check out the confirm(), prompt() and notify() methods too.