• Resolved xazos79

    (@xazos79)


    Hey all, i’m having an issue with getting the payment processing working correctly on a wordpress site.

    There seems to be a javascript error triggering that prevents the call from going through when the ‘Place Order’ button is pressed. Same error when the T&Cs checkbox is pressed too. The ‘myDropDown’ var is null.

    I can’t locate the origin of this Javascript, but here is a snippet with the error in question:

    //for mobile menu
    /* When the user clicks on the menu icon, 
    toggle between hiding and showing the dropdown content */
    function showNav() {
      document.getElementById("mobileNav").classList.toggle("showmenu");
    }
    
    // Close the dropdown if the user clicks outside of it
    window.onclick = function(e) {
      if (!e.target.matches('.dropNav')) {
      var myDropdown = document.getElementById("mobileNav");
        if (<strong>myDropdown</strong>.classList.contains('show')) {
          myDropdown.classList.remove('show');
        }
      }
    }

    The var, myDropDown, comes back as null on the getElementById call. The error in the JS console:
    https://preview.redd.it/f8zdpf36z2s91.png?width=506&format=png&auto=webp&s=df37a530e23646b2c734eeeab27455bf8290c6c9

    It seems to be the theme or WP code for the mobile menu, but i’m unsure where to locate/fix/disable this portion of code. Any help would be appreciated!

    • This topic was modified 3 years, 7 months ago by xazos79.
    • This topic was modified 3 years, 7 months ago by James Huff.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Stripe ‘Place Order’ button not functioning’ is closed to new replies.