0

I´m working in a Joomla! Template and am wondering: Why the javascript in the site doesn´t work if the file is inside a folder in the root folder of the template ? Why only works if the javascript file is on the root folder of the template?

This is when I declared the javascript on my index.php when the file is on a folder:

<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/main.js" type="text/javascript"></script>

This is when I declared the javascript on my index.php when the file is on the root folder:

<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/main.js" type="text/javascript"></script>
  • 1
    Did you check if the Code even appears in the source code of the HTML on the web site? – Javatasse Jul 14 '18 at 12:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.