Skip to Content
Menu
This question has been flagged
1 Atsakyti
6732 Rodiniai

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.


Portretas
Atmesti
Autorius 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.')
},
});
}



Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
gruod. 22
3097
1
lapkr. 19
18869
0
gruod. 21
4382
0
liep. 25
593
1
liep. 25
5614