0

Laravel Dev Application is not loading JavaScript

I am having a strange issue that I have never had before. This is my first Laravel application I have done. Anyways if you view the image below you will see my issue.

Using Google Chrome, my JavaScript files are linked properly, if I click on them in the source, they load the file correctly.

Below that you can see in my dev tools that the JS files do not show up at all in the Resources list! And as such, I cannot access JavaScript files, you'll notice the undefined error for jQuery.

As far as I know, JavaScript is enabled in my browser and works on other sites, sometimes I can even get some JS to work on this site but when I include JS file, they are not working, none of them!

Such a bizarre issue. Does anyone have a clue what could be going on here?

enter image description here

7
  • Where exactly are your files placed? Commented Sep 3, 2013 at 1:12
  • @Raphael_ My asset files are all placed in the default public directory of laravel Commented Sep 3, 2013 at 1:13
  • Did you try linking to the relative path, instead of the absolute one? Commented Sep 3, 2013 at 1:14
  • @Raphael_ I currently use Laravel's method like this... {{ asset('/js/jquery-1.10.2.min.js') }} Commented Sep 3, 2013 at 1:25
  • I have tried linking relative and full path and also have tested in Firefox and it has the same issue. I am thinking it must have something to do with the server but it's very strange as none of my non-laravel apps have this issue. Also the fact that I can click the link and the file will load in the browser so the links do work Commented Sep 3, 2013 at 1:28

1 Answer 1

3

You are going to kick yourself... script tag is src not href :)

Sign up to request clarification or add additional context in comments.

1 Comment

Oh man thank you! You won't believe how long this has been a problem, at least a few days...I've been working on the PHP side in that time but still! I think I copy/pasted them in a rush and that's the result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.