Sorry - I found the fault after reading the checklist
The code I had in <script type="text/javascript" src="/js/ectcart.js"></script> and I needed <script type="text/javascript" src="js/ectcart.js"></script>
I had to remove the forward slash for the source file. I've put this here in case it helps anyone as it seems the folder structure is particular.