diff --git a/index.html b/index.html index a74685c..df18d75 100644 --- a/index.html +++ b/index.html @@ -397,7 +397,7 @@

Bring Your Business

Your Personalized Odoo Project Plan

-

Tell us about your business. AI prepares a custom project plan with recommended modules, timeline, and roadmap. Download your PDF in minutes.

+

Tell us about your business. AI prepares a custom project plan with recommended modules, timeline, and roadmap. We will send the report in minutes.

diff --git a/script.js b/script.js index efa403a..bf4f299 100644 --- a/script.js +++ b/script.js @@ -602,33 +602,20 @@ var si = 0, submitBtn.textContent = 'Generating...'; submitBtn.disabled = true; - /* Create a hidden form to POST to the webhook and open response in new window */ - var f = document.createElement('form'); - f.method = 'POST'; - f.action = 'https://n8n.odoo4projects.com/webhook/bring-your-business'; - f.target = '_blank'; - f.style.display = 'none'; - - var fields = { - email: email, - description: description, - goals: goals, - challenges: challenges, - has_homepage: hasHomepage ? 'true' : 'false', - uses_odoo: usesOdoo ? 'true' : 'false', - has_developer: hasDeveloper ? 'true' : 'false' - }; - for (var key in fields) { - var inp = document.createElement('input'); - inp.type = 'hidden'; - inp.name = key; - inp.value = fields[key]; - f.appendChild(inp); - } - - document.body.appendChild(f); - f.submit(); - f.remove(); + /* POST silently to webhook — the report will be emailed */ + fetch('https://n8n.odoo4projects.com/webhook/bring-your-business', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + email: email, + description: description, + goals: goals, + challenges: challenges, + has_homepage: hasHomepage, + uses_odoo: usesOdoo, + has_developer: hasDeveloper + }) + }).catch(function () { /* ignore */ }); /* Show success message — we'll email the report */ form.style.display = 'none';