I want if note field have value, make alert. My code is:
odoo.define('website_sale_product_list.product', function (require) {
"use strict";
var ajax = require('web.ajax');
$(window).load(function(){
console.log('dg');
var note = $('#note').val();
console.log(note + ' note');
var comment = document.getElementById("note").value;
if( comment != null && comment != undefined) {
alert(comment);
}
else {
alert(comment + ' 0');
}
});
});
Note value is undefined. Help, i need any solution?