Alert BS5 and value

When I enter a value in Alert1.value in the program, the close button disappears when dismissable = true.
I can avoid this by changing the innerHTML and adding:
'<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>';

So you can’t use value when using dismissable = true.
I assume you should use value to change the message.
Can this be fixed?


This isn’t a big deal, I just wanted to point it out. The solution is to use innerHTML:
Alert1.innerHTML = 'Message...' + '<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>';

I’ve included a simple example:
Alert.appstudio.zip (12.2 KB)

Thanks!

We see the problem here and are working on a fix. In the meantime, try this:

Alert1.childNodes[2].data = "Message...

This is fixed in the next build.

1 Like