We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37942
    • 30 Posts
    Hello Everyone,

    Sorry to bother you guys again but i'm stuck at something, so i made simple website in static HTML and with jQuery. The local HTML files are working just fine but when converting the HTML to an modx template it all goes wrong.

    The only thing i did was taking the local HTML file and put it into a template, so i changed the static links and so. All the jQuery files are readable and according to Chrome's element inspector they are also being found. But, the error console tells me that there is an corruption in my jQuery source. Which is weird cause its the one hosted by jQuery and on the local HTML it works great.

    The error i get from the error console is (In the jquery-latest.js on line 620):

    Uncaught TypeError: Cannot call method 'replace' of undefined


    Line 620 of the jQuery source:

    return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );


    I can do HTML and CSS but Java ain't really my thing, does anyone know what this could mean?

    Iam using Modx Revo 2.2 with jQuery 1.7.1 (Latest) and the Carousel, Easin, Mousewheel and Slides plugins.

    Thanks,

    Nick
      • 31946
      • 116 Posts
      I think that one of your variables has not been initialized correctly so the replace function fails.
      Do you have a link?
      Check the values of rmsPrefix, rdashAlpha and fcamelCase.
        • 37942
        • 30 Posts
        Hi Wanze,

        Thanks for your quick reply! As i said im not really feeling comfortable with javascript, i can implement some jquery plugins but thats it. If you don't mind you could have a look at this link: http://schadecentrumnijverdal.nl/index.php. This is the page were talking about.

        Maybe it sounds a bit stupid but why wouldn't it work on the net with the exact same code as the local site?