#125_fehler_im_kontaktformular #126
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user