javascript - Script file not loading -
i beating head against wall on this. know javascript/jquery , can not see reason why not working. i've tried both 2.0.3 , 1.10.2 same results.
i'm trying test make sure script file loaded. i've tried number of different methods, nothing working. when click url in source, goes correct file has right code.
this i'm trying do.
$(document).ready(function() { alert('test'); });
which works if include in page between <script>
tags. not when referencing .js
file.
this how i'm loading it:
<script type="text/javscript" src="http://localhost/kdev/views/dashboard/js/default.js"></script>
clicking on url takes me correct file alert above.
but's not working. crap going on? did forget? have typo?
the entire page:
<!doctype html> <html> <head> <title>test</title> <link rel="stylesheet" href="http://localhost/kdev/public/css/default.css" /> <script type="text/javscript" src="http://localhost/kdev/public/js/jquery-2.0.3.min.js"></script> <script type="text/javscript" src="http://localhost/kdev/views/dashboard/js/default.js"></script> </head> <body> <div id="header"> header <br /> <a href="http://localhost/kdev/index">index</a> <a href="http://localhost/kdev/help">help</a> <a href="http://localhost/kdev/dashboard/logout">logout</a> </div> <div id="content"> dashboard... logged in </div> <div id="footer">feet</div> </body> </html>
change (you missed 'a' char in 'javascript')
<script type="text/javscript" src="http://localhost/kdev/views/dashboard/js/default.js"></script>
to this:
<script type="text/javascript" src="http://localhost/kdev/views/dashboard/js/default.js"></script>
Comments
Post a Comment