-2

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.

Binyam Assefa
  • 97
  • 1
  • 1
  • 10

1 Answers1

1

if you’re using Odoo v8

$(document).on('click', $('button:has(span:contains(Text Inside Button))'), function() {
    console.log('call function here');
});