Skip to Content
Menu
This question has been flagged
1 Odpoveď
6331 Zobrazenia

I need to realize this function for backend form view:

inherited XML:

<div id="target">Click here</div>

Javascript:

$( "#target" ).click(function() {
    alert( "Handler for .click() called." );
});


Thanks in advance for example or link.


Avatar
Zrušiť
Autor Best Answer

I found a solution:

Javascript:

openerp.my_module= function(instance) {
instance.web.FormView = instance.web.FormView.extend({
events: {
   'click #target': 'button_clicked',
},
button_clicked: function() {
  alert('Handler for .click() called.')
},
});
}



Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
dec 22
2518
1
nov 19
18421
0
dec 21
3923
0
júl 25
258
0
jún 25
480