I want to call a javascript on a button click, I tried a lot of examples and it didn't work. The button needs a name and the associated functions run on the server sides, I want the event to run on the client side only.
Asked
Active
Viewed 148 times
-2
-
Here is a solution using the owl odoo framework. https://github.com/binyama/button_to_call_js_odoo.git – Binyam Assefa Jan 18 '23 at 15:35
1 Answers
1
if you’re using Odoo v8
$(document).on('click', $('button:has(span:contains(Text Inside Button))'), function() {
console.log('call function here');
});

Miracle Nwaubani
- 21
- 3