Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4666 มุมมอง

Hi all,

in my xml 


<header>
<button onclick="myFunction()" name="click_me" string="Click"
class="oe_highlight"/>
</header>

and in my custom .js file 


function myFunction() {
alert("Hello! I am an alert box!!");
}

the javascript function called after i button pressed but the create/save buttons got disable like below 

https://prnt.sc/qyb8m9

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

The easy way fix is just use enable trick on your js

function myFunction() {
alert("Hello! I am an alert box!!");
//enable the button that is disabled for example save/cancel button ​$('.o_form_button_save').prop('disabled', false); // Enable Save button $('.o_form_button_cancel').prop('disabled', false); // Enable Cancel button
}
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 16
11360
1
ต.ค. 20
4846
2
มิ.ย. 20
4572
5
ธ.ค. 17
5880
3
ม.ค. 24
16908