Good day. Tell me, please, how to make a pop-up message (for example, an error) with animation activation from php (For example, I want to create a file, and there is already such a file, and I get an error message). I found such messages in Google, but it’s not going to get to me how to activate it not by clicking on a button, but straight from PHP code.
1 answer
Using twitter bootstrap, for example. PHP does not play any role here. Is that output HTML.
$(".alert").alert() <htmL> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/> </head> <body> <div class="alert alert-warning alert-dismissible fade show" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> <strong>Holy guacamole!</strong> You should check in on some of those fields below. </div> </body> </html> |