콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
808 화면

Here In odoo 13 I create a website template. inside this template i add a button. I want to show a message after clicking the button in website but the website console no message showing. how can I do this here i added my code 
js:

odoo.define('spiralworld_agm_webinar.zoom_button', function (require) {
"use strict"

// Wait for the document to be fully loaded
$(document).ready(function () {
// Find the "Join Meeting" button by its ID
var joinMeetingButton = document.getElementById('joinMeetingButton');

if (joinMeetingButton) {
// Add a click event handler to the button
joinMeetingButton.addEventListener('click', function () {
// Display a message in the console
console.log("Button clicked - Join Meeting event handled.");
// You can add more code here to perform additional actions
});
}
});

});

I added this js in website.assets_frontend
아바타
취소
베스트 답변

Hi,

You can refer this blog for you development


https://www.cybrosys.com/blog/how-to-load-dynamic-content-into-odoo-website-without-refreshing-the-page


This is for version 16 but for your case this can be a reference


In your case you are not following a oops concept, In odoo when creating website you need to extend or include a public widget


Regards

아바타
취소