Javascripts in .js files suddenly not working

Website URL

chempanion.uk (chempanion.rf.gd)

Error Message

No error message as unable to access any developer tools in my browser.

Other Information

My website uses javascript extensively. Everything was working fine but now any javascripts in a .js file rather than in the html itself do not work. Is this a result of the php upgrade that is taking place or is this something else?
I recently switched domain name (and provider) and acquired SSL certificates but the linked .js files use relative URLs anyway so protocol and domain change shouldn’t have broken the src= links.

Help or advice please?

Hi, welcome to the forum.

If you open the developer console in your browser does it show any error messages from the page (e.g. missing file)?

Sorry to waste your time. Thanks.

I had to install Kiwi Browser on my phone so I could access the developer console and lo and behold i’d put a dodgy (although i’m not sure how?) regexp line into a .js file.
I didn’t even consider this could be the issue as the line was in a function i wasn’t using on the affected pages.

(by the way the offending expression was : formula.value.replace(/(\d(+|-))/g, ‘$1’)

I don’t need this function at the moment anyway so have just removed it.

Sorry again.
Thanks.

3 Likes

No problem. I’m glad to hear you got it working. Thanks for reporting back with your solution.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.