Skip to Content
Menú
This question has been flagged
1 Respondre
6254 Vistes

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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
2
de des. 22
2438
1
de nov. 19
18360
0
de des. 21
3855
0
de juny 25
277
1
de juny 25
578