Skip to content
Advertisement

Sweet Alert inside a If Statement

I’am trying (without luck) to implement a Swal inside a If statement.

here is what i’ve done:

JavaScript

And here is the links in my html:

JavaScript

Any tip to how can I make this work? I guess my problem is inside the If statement, but I don’t know how to fix it

Advertisement

Answer

end up that everything was working nice, but… I forget to put this in my code

event.preventDefault()

That prevent the Swal to not work well.

By the end, the final code went like this:

JavaScript

Thanks for giving me that tips guys 😉

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement