I'm trying to use sweetalert
to give a "Submitted" alert.
if($rstSql["cod_erro"] == 0)
{
echo '<script> swal("Good job!", "You clicked the button!", "success"); <script>';
}
else
{
echo '<script>alert("message2");</script>';
}
Apparently, the default alert works while SWAL does not. I tested it on another page and called it normally, the libraries are being called in:
<script src="swap/sweet-alert.js"></script>
<link rel="stylesheet" type="text/css" href="swap/sweet-alert.css">
When I use debug in chrome I get the following message:
Uncaught TypeError: Can not read property "prototype'of undefined>