From bb36976fffecfaab9e673f9f6c9044e6c28e4410 Mon Sep 17 00:00:00 2001 From: dmcdowell Date: Tue, 22 Aug 2023 16:45:29 -0600 Subject: [PATCH] updates! --- src/routes/+page.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 096c7e9..dd3d78f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -15,10 +15,10 @@ name, body }; - var name = document.getElementById('name'); - var body = document.getElementById('body'); + var nameValue = document.getElementById('name'); + var bodyValue = document.getElementById('body'); - if (name.value !== '' && body.value !== '') { + if (nameValue.value !== '' && bodyValue.value !== '') { try { const response = await fetch('https://helpdeskapi.mpe.ca/api/message', { method: 'POST', @@ -31,8 +31,8 @@ if (response.ok) { console.log('POST request successful'); toastr.success('One of the members of the IT department will contact you shortly', 'Message sent!'); - body.value = ''; - name.value = ''; + nameValue.value = ''; + bodyValue.value = ''; } else { console.error('Error:', response.status); toastr.error('Error: ' + response.status, 'Message not sent');