I've been diving deep into various online resources to find a solution for an issue I'm encountering. My familiarity with Javascript is limited, so please bear with me.
Whenever I click on the next button during checkout, a script runs to submit the data to our ecommerce system. I've also incorporated a script that sends the data to an email marketing platform we utilize. The script checks if a checkbox is selected. Regardless of whether it's checked or not, I'm using the code below to insert an image where the src carries the data.
This process works seamlessly in Chrome and Safari, but Firefox and IE seem to stall loading the next page as they wait for the image response (which doesn't exist). However, the data is effectively transmitted to the external marketing system.
I'd greatly appreciate any guidance as this situation is causing quite some stress.
document.getElementById("idBtnNext").addEventListener("click", AddContact, false);
function AddContact(){
//Variable declarations
}
if (document.getElementById('idINVOICEPRIVACY').checked == false) {
//Action for unchecked privacy box
return true;
}
else if (document.getElementById('idINVOICEPRIVACY').checked == true){
//Action for checked privacy box
return true;
}
}