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

Hello Odoo Community,


I hope this message finds you well. I am currently working on customizing a page of the website in Odoo 17 using the HTML/CSS editor. My goal is to display content dynamically when a user clicks on a button. However, I am facing challenges in connecting the button to the associated JavaScript code.

I have tried injecting the JavaScript code into the head, adding it to a separate JS file, and including it within the 

Ảnh đại diện
Huỷ bỏ

you can use "t-on-click", something similar to this
<button class="o_event_select_attendee btn btn-primary mb16" t-on-click="onClickSelectAttendee()">
<div class="mb16 mt16">Select Attendee</div>
</button>

Tác giả Câu trả lời hay nhất

I attempted the solution you suggested using 't-on-click', the function (onClickSelectAttendee()) does not execute when the button is clicked 


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 24
1308
0
thg 11 22
1837
0
thg 7 15
6063
2
thg 9 21
52898
0
thg 12 17
3582