Announcement

Collapse
No announcement yet.

Running tiny scripts

Collapse
X
  • 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.

    Scott
    What help do you need today!
    Interactive Design Solutions http://www.southbound.com
    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

    Comment


    • 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.

      Comment


      • Originally posted by cpp-dev View Post
        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
        Have you tried adding the script directly to the page instead of the User Interface?
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment


        • 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.

          Update:

          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.

          Comment


          • 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 -- http://paste.mozilla.org/n8GDbysh

            Comment

            Working...
            X

            This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

            This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

            Accept