Forum Discussion
Hi Angela
I use below code snippet which will give the standard ARAS confirm dialog
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:b1d43290-5880-49ad-94f6-5eaea44acb1a:type=javascript&text=var%20message%20%3D%20%22Testing%20ARAS%20Confirm%20Dialog%22%3B%0D%0Aconst%20title%20%3D%20%22Confirm%20Delete%22%3B%0D%0Aconst%20image%20%3D%20%22..%2Fimages%2FDelete.svg%22%3B%0D%0Aconst%20okButtonText%20%3D%20%22Delete%22%3B%0D%0Aconst%20options%20%3D%20%0D%0A%7B%0D%0A%09title%2C%0D%0A%09image%2C%0D%0A%09okButtonText%2C%0D%0A%09okButtonModifier%3A%20%27aras-button_secondary%27%0D%0A%7D%3B%0D%0Awindow.parent.ArasModules.Dialog.confirm%28message%2C%20options%29.then%28%0D%0Afunction%28res%29%20%0D%0A%7B%0D%0A%20%20%20%20switch%20%28res%29%20%7B%0D%0A%20%20%20%20%20%20%20%20case%20%27ok%27%3A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20alert%28%22Selected%20Yes%21%22%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%20%20%20%20default%3A%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20window.parent.close%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%29%3B]
Thanks
Gopikrishnan R
- AngelaIp4 years agoIdeator I
Hi Gopi,
that was exactly the answer I hoped for! Many thanks! I knew that ArasModules provided a few new designs, but didn´t know it already contains a confirm update.
And it even works in my Innovator 12!
There was just one limitation. My current version doesn´t seem to support custom images yet. I looked at the code used for the confirm and it was still hardcoded to the Warning.svg. But for my use case the warning is just fine.
It´s really looks so much better now!
Many thanks!
Angela