Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Referencing a custom external javascript file in asp.net mvc 3

Hi I'm trying to pull some javascript on a page off of the page and putting it into an external javascript file for reusability.

Just as a test I'm just trying to display an alert text box but even that's not working.

Here's what I have so far.

Page with the javascript

EDIT: Ignore the type="text/javascript" that wasn't the problem

enter image description here

Here's the actual content of the script.js

enter image description here

File Structure from the site root

enter image description here

Honestly it looks like it should work but whenever I run the page in the browser I'm getting this error.

enter image description here

I know that the path is correct, but what am I missing?

like image 840
Odnxe Avatar asked Mar 19 '26 04:03

Odnxe


1 Answers

The problem was I wasn't clearing my cache, sorry newbie mistake :(

like image 98
Odnxe Avatar answered Mar 21 '26 19:03

Odnxe