Welcome Guest, Not a member yet? Register   Sign In
Can't load external javascript code
#1

Hello,
I'm trying to load an external javascript code inside a view from my project, but the browser can't find.

The javascript is found on: localhost/diceroller/assets/js/script.js
My index.php is found on: localhost/diceroller

The load external javascript code is in my view:
Code:
<script src='<?php echo base_url("assets/js/script.js"); ?>' type='text/javascript' ></script>

On Firefox, when I press F12 I found on console that say the following:

Code:
Falha no carregamento do <script> com a fonte “http://localhost:8080/diceroller/assets/js/script.js”
(Failed to load <script> with source "http://localhost:8080/diceroller/assets/js/script.js")

As you can see, the script.js is on localhost/diceroller/assets/js/ but the browser can't find on that folder.
Reply


Messages In This Thread
Can't load external javascript code - by danielsonsilva - 04-30-2020, 01:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB