No announcement yet.

Running tiny scripts

  • Filter
  • Time
  • Show
Clear All
new posts

    Running tiny scripts

    I have a teeeeeny little bit of JavaScript (well it's jQuery based if that makes a difference) that I want to run on a specific page, and just one page. I've put it in the page header and footer of the page tempate but it doesn't seem to run.

    The first thing to check is that Jquery is running and loaded before your script.

    After that, use the browser's inspector tool, the console, and see if there is an error.

    What help do you need today!
    Interactive Design Solutions
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    My T-shirt Collection is mostly MivaCon T-shirts!!
    Competitive Rates, Popular Modules, and Integrations:
    Product Copy | AutoBaskets | Waitlist Integration| Wholesale Integration


      When I run the script from the browser console it does exactly what I'd expect.

      I added the script as an inline script on the User Interface > JavaScript Resource page, and now my cart is giving me a 504 ...

      it seems the 504 is coming from external scripts not loading from their CDNs
      Last edited by cpp-dev; 06-16-20, 08:20 AM.


        I have, and that's where I was not getting the expected results, first.

        Additionally, I'm beginning to wonder if it is an inconsistent behavior in Firefox, as I just loaded the page in Edge (the Chromium based one) and it came up just fine.


        I cleared my Firefox cookies, and the page loaded. So there must have been some sort of cache failure. Still not seeing my scripting but now I can get back to testing.
        Last edited by cpp-dev; 06-16-20, 09:33 AM.


          So here's the run down of what I've tired:

          1. Adding the script directly to the page header
          2. Adding the script directly to the page footer
          3. Putting the script into a JavaScript Resource - and attaching it to the page footer

          If it helps here's a pastebin (temporary) to the script --