Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1556 Zobrazení

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 

Avatar
Zrušit

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>

Autor Nejlepší odpověď

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


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 24
1409
0
lis 22
1933
0
čvc 15
6163
1
čvc 25
53173
0
pro 17
3658