Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search


  • Content Count

  • Joined

  • Last visited

Everything posted by nekonote404

  1. Thanks to @brandon and @colin.irwin, the problem was solved. I apologize for the replay.
  2. It's a new site and it's not ready for public yet, but here it is. https://lychee-chiton-g4er.squarespace.com/rings/bague-branche-large So the site's original language is in French, and my code can convert certain words and phrases into English. As I set English as default language temporary, my code will run when page is loaded and it will translate the page into English automatically. At this point, the order button still works. However, if I click on the "fr" link at the top of the page, it will translate back the page to French, but the order button no longer wor
  3. Thanks @colin.irwin Your code works too for executing the code on page loading. But, the problem that I'm having is when it's called from pressing a button. I don't know why, but it will disable the Add to Cart button. Are we allowed to make changes to the template using Javascript? <ul id="lang-panel"> <li id="lang-btn-en" class="lang-btn" onclick="switchLang();"> en</li> </ul> ------------ function switchLang () { document.body.innerHTML = document.body.innerHTML.replace(/Bonjour/g, "Hello"); }
  4. Hi, I'm trying to make a simple translation program using Javascript to replace certain words from French to English/English to French when pressing a button. I'm using innerHTML.replace to do this, and it works fine. document.body.innerHTML = document.body.innerHTML.replace(/Bonjour/g, "Hello"); However, in the Product detail page, the Add to Cart button stops working after running the code. The same code runs at the page load, and it's fine. It has no affect on the Add to Cart button. window.addEventListener('DOMContentLoaded', function() { document.body.innerHTML = docum
  • Create New...