跳至內容
選單
此問題已被標幟
3 回覆
10290 瀏覽次數

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"/>
頭像
捨棄
作者 最佳答案

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.

頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

Hi! Have you found any solution?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
8月 24
5932
1
10月 22
23522
2
9月 21
12266
1
8月 21
7977
1
7月 21
4003