Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6259 Vistas

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 Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
2
dic 22
2448
1
nov 19
18369
0
dic 21
3863
0
jun 25
295
1
jun 25
613