Skip to Content
Menu
This question has been flagged
3846 Views

Xml:

<record id=“rec_id” model="ir.ui.view">
        <field name="name">Demo</field>
        <field name="model">model.name</field>
        <field name="arch" type="xml">
            <form string=“Demo”>
                <header>
                    <h1>
                        <table align="center"class="Demo_class">
                            <tr>
                                <td align="center">
                                    <input   type="button" id=“demo_id” string=“Demo Button” class=“find_button”/> 
                                </td>
                            <tr>
                        </table>
                    </h1>
                 </header>
            </form>
        </field>
        </record>
Js:
var DemoClass = form_common.FormWidget.extend(form_common.ReinitializeWidgetMixin, {

events : {
'click .find_button':'find_button',
},

init: function() {
    this._super.apply(this, arguments);
}

find_button : function(){
    console.log("Click Event Called")
},

});

Issue: This is my code i just want to bind click event to specific Css selector ".find_button" but this code has not worked. Any one help me to resolve this problem.


Avatar
Discard
Related Posts Replies Views Activity
1
Jun 18
2888
1
Jun 18
5848
0
Aug 17
3177
0
Jul 17
2522
0
May 16
2190