skip to Main Content

Javascript – I need to fire an event for the IndexModel when the user closes the page

This is my code: <script> function sendFieldData() { var email = document.getElementById('EmailComprador').value; var telefone = document.getElementById('TelefoneComprador2').value; var nome = document.getElementById('NomeComprador2').value; var data = { CostumerEmail: email, CostumerName: nome, CostumerPhone: telefone, }; if (email) { let curfetchUrl = `${window.location.pathname}?handler=SaveAbandonedCart`; fetch(curfetchUrl, {…

VIEW QUESTION
Back To Top
Search