I think it's because you're binding an action to "onsubmit" which will by default redirect from the page you're on. Try removing the `onsubmit=` part in your HTML and add this to your JavaScript instead (using jQuery): #1007
I think it's because you're binding an action to "onsubmit" which will by default redirect from the page you're on. Try removing the `onsubmit=` part in your HTML and add this to your JavaScript instead (using jQuery):
$( "form#measure-the-heat").submit(function(event) {
event.preventDefault(); // Prevent the page from redirecting
// Put the swal-code here
});
Originally posted by @t4t5 in https://github.com/t4t5/sweetalert/issues/414#issuecomment-126568556