Control Alert Type with JS

How can i change the type of an alert running a javascript code?

Hi @daveAS, if you're attempting to change the alert component type due to a condition, you should be able to set the type as ternary using JavaScript. Here's an example of doing this:

Is this what you're looking to achieve with changing the alert types?

1 Like