generated from tod/odin-webpack-template
UI: Add timeout for success alert to give time for confetti
This commit is contained in:
parent
ec621d42b3
commit
12eb673c90
|
@ -41,9 +41,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
const formData = new FormData(form);
|
||||
const formDataValue = formData.values();
|
||||
const [email, country, zip] = Array(5).fill(formDataValue.next().value);
|
||||
alert(
|
||||
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
|
||||
);
|
||||
setTimeout(() => {
|
||||
alert(
|
||||
`Success!\nEmail: ${email}\nCountry: ${country}\nZIP: ${zip}\nPassword: [redacted]`,
|
||||
);
|
||||
}, 600);
|
||||
} else {
|
||||
alert("Hold up, one or more fields are invalid! Try again");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue