Alternative to alert on Client Script?

Zod
Giga Guru

Hi,

when using alert, as browser message does always occur as headerline ... ans this is even language independent (always takes the browser language and ignores the servicenow user language ... ).

I need to show a message that actively need to be confirmed or at least can be stopped to avoid proceeding. I do only know the alert for this ... but the header line does not look nice .. any other option?

 

find_real_file.png

 

 

 

3 REPLIES 3

saurav1
Kilo Expert

Hello,

You can use confirm("your text");

It comes with a ok and cancel button.

 

Please Mark as correct answer if found useful.

I read once that confirm is not to be used anymore ... but ok anyhow .. delivers the same outcome with the headerline ;-(

Just additionally the OK or Cancel ... 

So does not solve the issue ;-(

browser alerts will always come with a javascript header. But for the cancel part you can always use return false, which will prevent the user from submitting the form.