Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
6575 Prikazi

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
Opusti
Avtor 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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
dec. 22
2860
1
nov. 19
18674
0
dec. 21
4149
0
jul. 25
419
1
jul. 25
5318