コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1450 ビュー

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
1293
0
11月 22
1808
0
7月 15
6027
2
9月 21
52844
0
12月 17
3559