Hi everyone,
I've got a nested design area, that has some html to link in some javascript files. The code uses src="./?a=1234" to bring in the file.
The resulting html in the browser is fine, it translates the path correctly, and using the full path given, I can locate the javascript file in my browser.
EG:
<script type="text/javascript" src="http://mysite.co.uk/__data/assets/js_file/0010/37747/main.js">
But, even though the files are there, they are not working.
The files work on my local copy of the page, so the files themselves are fine.
The files are in Matrix as JS File asset types.
So, what am I missing? It's like Matrix can find the files, but its not executing them on the page - so is the way that I've put them in meaning they are loading up after the page has loaded in the browser, so they don't execute?
Any advice very appreciated!
Thanks,
Charlie.
Linked javascript not working
Cwestney
(Charlotte Westney)
#1
nnhubbard
(Nic Hubbard)
#2
Do you have the page to show us?
Also, are you making sure to add the closing </script> tag?
It doesn't sound to me like this is a Matrix issue, just need a little more debugging on your end.
Cwestney
(Charlotte Westney)
#3
Nic - you were 100% right, just some more debugging needed.
I was just writing out a detailed reply to you, showing the difference between the local version and the Matrix version, and I spotted it - its the order!
I had the Jquery script loading after the other scripts in the Matrix version. I've just switched them about and bingo - javascript firing all over the place.
Great stuff.
Charlie.