Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
10708 Lượt xem

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"/>
Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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?"/>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi! Have you found any solution?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 24
6618
1
thg 10 22
24304
2
thg 9 21
13018
1
thg 8 21
8510
1
thg 7 21
4498