blob: 6386ea865e99964f81d85c20df5ae12c9f9c69c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//function sendMessage(){}
function changeRecipient(){
const email = document.getElementById('recipient').value;
const id_form = '';
fetch('index.php?action=recipient_email', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ id_form: id_form, email: email })
})
.then(response => response.json())
.then(data => {
if(data.success)
{
toastNotify('Adresse e-mail de destination modifiée');
}
else {
console.error('Erreur: echec de la modification de l\'adresse e-mail de destination');
}
})
.catch(error => {
console.error('Erreur:', error);
});
}
|