Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
10576 Visninger

I want to show alert message by JavaScript file when click on a button, which is added in XML. I try a lot by different methods but didn't reached to any solution. So, anyone can solve this problem.
My XML Code is here.

Xml Code:

<button name = "name"  type="button" onclick="updatebtn" class="btn"/>
Avatar
Kassér
Forfatter Bedste svar

Hii Raaj,

It's working for form view in xml file, but i want that this alert message pop-up by javascript file when click on "My Button". Thanks for support.

Avatar
Kassér
Bedste svar

HI Pawan, I am not sure about JS alert message for Odoo form view button,as we can provide JS alert for Odoo templates button, but you can use confirm attribute to you button to show any warning message,but it won't stop you to proceed further.

Syntax : <button name="button_name"  string="My Button"  type="object" confirm="Are you sure you want to Proceed?"/>

Avatar
Kassér
Bedste svar

Hi! Have you found any solution?

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
aug. 24
6358
1
okt. 22
24096
2
sep. 21
12777
1
aug. 21
8332
1
jul. 21
4334