From 5710d0d7e8ae67a0153eeea8b8f14645ca8e835b Mon Sep 17 00:00:00 2001 From: oonyeje Date: Sun, 23 Nov 2025 09:36:14 -0500 Subject: [PATCH] - move script file below the contact form html --- .webstudio/data.json | 94 ++++++++++++------------- app/__generated__/$.tsx | 2 +- app/__generated__/[contact]._index.tsx | 10 +-- app/__generated__/[services]._index.tsx | 2 +- app/__generated__/_index.tsx | 2 +- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.webstudio/data.json b/.webstudio/data.json index abefd73..6cff717 100644 --- a/.webstudio/data.json +++ b/.webstudio/data.json @@ -1,10 +1,10 @@ { "build": { - "id": "e9c81588-e714-4267-926a-2c31ca888645", + "id": "4dc1ad00-4fe1-4c96-8c5c-746c4e4293ef", "projectId": "363652e3-9846-4534-acdf-9b2b3c66eec0", - "version": 1380, - "createdAt": "2025-11-23T14:14:47.33+00:00", - "updatedAt": "2025-11-23T14:14:47.33+00:00", + "version": 1381, + "createdAt": "2025-11-23T14:35:23.308+00:00", + "updatedAt": "2025-11-23T14:35:23.308+00:00", "pages": { "meta": { "siteName": "Inasa Healthcare", @@ -18836,36 +18836,6 @@ "value": "top" } ], - [ - "cw60Z5OIddkmhYrAGLuXS", - { - "id": "cw60Z5OIddkmhYrAGLuXS", - "instanceId": "uSjaW2mbY3uU8GvRWvgZk", - "name": "executeScriptOnCanvas", - "type": "boolean", - "value": true - } - ], - [ - "invnFN8o-LKo5xUeNsOCu", - { - "id": "invnFN8o-LKo5xUeNsOCu", - "instanceId": "uSjaW2mbY3uU8GvRWvgZk", - "name": "code", - "type": "string", - "value": "\n" - } - ], - [ - "c7ZFH-NdaT_K_CbWS7ZfX", - { - "id": "c7ZFH-NdaT_K_CbWS7ZfX", - "instanceId": "uSjaW2mbY3uU8GvRWvgZk", - "name": "data-ws-show", - "type": "boolean", - "value": true - } - ], [ "ccITyZzB79B6v3ZUQR0XR", { @@ -19115,6 +19085,36 @@ "type": "boolean", "value": true } + ], + [ + "O8ZrMSAf-peBbAcxnEe_V", + { + "id": "O8ZrMSAf-peBbAcxnEe_V", + "instanceId": "pYQCHxLaM41Bu_mV4UbC-", + "name": "executeScriptOnCanvas", + "type": "boolean", + "value": true + } + ], + [ + "Defpg4FroNqeViZFGwY1Z", + { + "id": "Defpg4FroNqeViZFGwY1Z", + "instanceId": "pYQCHxLaM41Bu_mV4UbC-", + "name": "code", + "type": "string", + "value": "\n" + } + ], + [ + "Hb00IyqTqc5rUNcz7kiW2", + { + "id": "Hb00IyqTqc5rUNcz7kiW2", + "instanceId": "pYQCHxLaM41Bu_mV4UbC-", + "name": "data-ws-show", + "type": "boolean", + "value": true + } ] ], "dataSources": [], @@ -22001,6 +22001,10 @@ "type": "id", "value": "sir1L86ob3MdPhstm94Hb" }, + { + "type": "id", + "value": "pYQCHxLaM41Bu_mV4UbC-" + }, { "type": "id", "value": "EU6EtJAyQi0dpga8GbbPz" @@ -22044,10 +22048,6 @@ "type": "id", "value": "HLdPOW3dqt3mudoX4-MkP" }, - { - "type": "id", - "value": "uSjaW2mbY3uU8GvRWvgZk" - }, { "type": "id", "value": "lCpf84n4fhCxkyPGN9sTF" @@ -22074,15 +22074,6 @@ ] } ], - [ - "uSjaW2mbY3uU8GvRWvgZk", - { - "type": "instance", - "id": "uSjaW2mbY3uU8GvRWvgZk", - "component": "HtmlEmbed", - "children": [] - } - ], [ "lCpf84n4fhCxkyPGN9sTF", { @@ -22366,6 +22357,15 @@ "tag": "input", "children": [] } + ], + [ + "pYQCHxLaM41Bu_mV4UbC-", + { + "type": "instance", + "id": "pYQCHxLaM41Bu_mV4UbC-", + "component": "HtmlEmbed", + "children": [] + } ] ], "deployment": { diff --git a/app/__generated__/$.tsx b/app/__generated__/$.tsx index 4aa687d..07cf8b4 100644 --- a/app/__generated__/$.tsx +++ b/app/__generated__/$.tsx @@ -10,7 +10,7 @@ import { HtmlEmbed as HtmlEmbed, Fragment as Fragment_1, Image as Image, Slot as export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0"; - export const lastPublished = "2025-11-23T14:14:47.330Z"; + export const lastPublished = "2025-11-23T14:35:23.308Z"; export const siteName = "Inasa Healthcare"; diff --git a/app/__generated__/[contact]._index.tsx b/app/__generated__/[contact]._index.tsx index bf6b166..a9134f8 100644 --- a/app/__generated__/[contact]._index.tsx +++ b/app/__generated__/[contact]._index.tsx @@ -10,7 +10,7 @@ import { Link as Link, Body as Body, RemixForm as RemixForm } from "@webstudio-i export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0"; - export const lastPublished = "2025-11-23T14:14:47.330Z"; + export const lastPublished = "2025-11-23T14:35:23.308Z"; export const siteName = "Inasa Healthcare"; @@ -149,10 +149,6 @@ className={`w-element`}> className={`w-element`}> {"Contact Us"} -\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n\n"} -className={`w-html-embed`} /> id={"contact.responseMessage"} className={`w-element`} /> +\n document.getElementById('contact.form').addEventListener('submit', function(event) {\n event.preventDefault(); // Prevent default form submission\n\n const webhookUrl = 'https://n8n-ai.bsidesolutions.net/webhook-test/9974ca96-98ba-4e56-bb48-debfdad8cf59'; // use Webhook studio Global data var\n \n const name = document.getElementById('contact.name').value;\n const subject = document.getElementById('contact.subject').value;\n const sender = document.getElementById('contact.email').value;\n const message = document.getElementById('contact.message').value;\n const recipient = 'no-reply@inasahealthcare.com'; // use Webhook studio Global data var\n\n const formData = {\n name,\n subject,\n sender,\n message,\n recipient\n };\n\n fetch(webhookUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json' // Or 'application/x-www-form-urlencoded' if your webhook expects that\n },\n body: JSON.stringify(formData) // Send data as JSON\n })\n .then(response => {\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return response.json(); // Or response.text() if your webhook doesn't return JSON\n })\n .then(data => {\n document.getElementById('contact.responseMessage').innerText = 'Message sent successfully!';\n console.log('Success:', data);\n document.getElementById('contact.form').reset(); // Clear the form\n })\n .catch(error => {\n document.getElementById('contact.responseMessage').innerText = 'Error sending message.';\n console.error('Error:', error);\n });\n});\n\n"} +className={`w-html-embed`} />
diff --git a/app/__generated__/[services]._index.tsx b/app/__generated__/[services]._index.tsx index 28bb9f3..6737f0c 100644 --- a/app/__generated__/[services]._index.tsx +++ b/app/__generated__/[services]._index.tsx @@ -11,7 +11,7 @@ import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as Dial export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0"; - export const lastPublished = "2025-11-23T14:14:47.330Z"; + export const lastPublished = "2025-11-23T14:35:23.308Z"; export const siteName = "Inasa Healthcare"; diff --git a/app/__generated__/_index.tsx b/app/__generated__/_index.tsx index 291a610..19c4200 100644 --- a/app/__generated__/_index.tsx +++ b/app/__generated__/_index.tsx @@ -11,7 +11,7 @@ import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as Dial export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0"; - export const lastPublished = "2025-11-23T14:14:47.330Z"; + export const lastPublished = "2025-11-23T14:35:23.308Z"; export const siteName = "Inasa Healthcare";