Skip to navigation Skip to content

iseomagic

  • About Us
  • Shop
  • Monthly Subscription €99.99
  • Testimonials
  • Terms & Conditions
  • Contact
  • My account
  • Home
  • #668 (no title)
  • About Us
  • Blog
  • Cart
  • Checkout
  • Contact
  • Monthly Subscription €99.99
  • My account
  • Payment
  • Payment
  • Payment
  • Shop
  • Terms & Conditions
  • Testimonials
  • €0.00 0 items
Home / Blog
Posted on November 5, 2017 by admin — Leave a comment

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Category: Uncategorized
© iseomagic 2026
Built with WooCommerce.
  • My Account
  • Search
  • Cart 0
document.getElementById('send-button').addEventListener('click', sendMessage); document.getElementById('user-input').addEventListener('keypress', function (e) { if (e.key === 'Enter') { sendMessage(); } }); function sendMessage() { const inputField = document.getElementById('user-input'); const message = inputField.value.trim(); if (message) { appendMessage('You: ' + message); inputField.value = ''; // Simulate a response from the plumber's support bot setTimeout(() => { appendMessage('Bot: ' + getBotResponse(message)); }, 1000); } } function appendMessage(message) { const chatBox = document.getElementById('chat-box'); const messageElement = document.createElement('div'); messageElement.textContent = message; chatBox.appendChild(messageElement); chatBox.scrollTop = chatBox.scrollHeight; // Scroll to bottom } function getBotResponse(message) { const lowerCaseMessage = message.toLowerCase(); if (lowerCaseMessage.includes("leak")) { return "We can help you with leaks! Please provide details about the location."; } else if (lowerCaseMessage.includes("clog")) { return "Clogs are common! Can you tell me what is clogged?"; } else if (lowerCaseMessage.includes("quote")) { return "Please provide your details, and we'll send you a quote ASAP."; } else if (lowerCaseMessage.includes("thank you")) { return "You're welcome! If you have any more questions, feel free to ask."; } else { return "I'm here to help! Can you please rephrase or provide more details?"; } }