How to receive data from java-script file to template
when i am clicking button in template first it enters into js file and i need response from js file to same template. can you text the procedure how to do.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How to receive data from java-script file to template
when i am clicking button in template first it enters into js file and i need response from js file to same template. can you text the procedure how to do.
Hello
there are many ways you can do it. I'll show you one method to write value of a variable in js to xml template
you can define global variables in your init function.
init: function(parent,options){
this._super(parent,options);
this.var_name = 0
create a div in xml template
<div class="some_class"/>
Edit it on button click, and write your value to div from js
$(".some_class").text(this.var_name);
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up