#125_fehler_im_kontaktformular #126

Merged
muli merged 8 commits from #125_fehler_im_kontaktformular into main 2022-08-24 22:41:22 +02:00
Showing only changes of commit f9229b5998 - Show all commits

View File

@ -1,4 +1,4 @@
const ajaxUrl = '../php/contact_form.php';
const contactFormAjaxUrl = '/php/contact_form.php';
const contact_form = document.getElementsByClassName('content__contact_form')[0];
const subject = document.getElementsByClassName('contact_form__subject')[0];
const message = document.getElementsByClassName('contact_form__message')[0];
@ -11,7 +11,7 @@ const feedback = document.getElementsByClassName('contact_form__feedback')[0];
window.addEventListener('DOMContentLoaded', function(event) {
let formData = new FormData();
formData.append('action', 'start_session');
fetch(ajaxUrl, {
fetch(contactFormAjaxUrl, {
method: 'POST',
mode: 'same-origin',
body: formData,
@ -39,7 +39,7 @@ contact_form.addEventListener('submit', function(event) {
return;
}
fetch(ajaxUrl, {
fetch(contactFormAjaxUrl, {
method: 'POST',
mode: 'same-origin',
body: formData,