if i have to add your message is added alert and redirect to next page in php code example
Example 1: How to stop the page to be reload on keypress of enter
BY LOVE
$("#tax_rate_name, #tax_rate_rate").keypress(function (event) {
if (event.keyCode == 13) {
event.preventDefault();
}
});
Example 2: How to make a function run only after 2 events has triggered js
const promise1 = Promise.resolve(3);
const promise2 = 42;
const promise3 = new Promise(function(resolve, reject) {
setTimeout(resolve, 100, 'foo');
});
Promise.all([promise1, promise2, promise3]).then(function(values) {
console.log(values);
});
// expected output: Array [3, 42, "foo"]