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

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 

頭像
捨棄

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>

作者 最佳答案

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


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
3月 24
974
0
11月 22
1447
0
7月 15
5616
2
9月 21
51987
0
12月 17
3166