AXskinaDiap
New Member
I have a probably very simple problem that is completely spoofing me.I have got a web server (XAMPP) running off a reasonably slow usb stick.I've got a very simple file structure:\[code\]--htdocs --projects --callback index.html --js jquery-1.9.1.min.js callbackclient.js --css main.css\[/code\]For some reason, I can't get a simple linked script working:Here is my index.html\[code\]<!DOCTYPE HTML><html> <head> <script src='http://stackoverflow.com/questions/15626137/js/jquery-1.9.1.min.js' type='text/javascript'></script> <script src='http://stackoverflow.com/questions/15626137/js/callbackclient.js' type='text/javacsript'></script> <link href='http://stackoverflow.com/questions/15626137/css/main.css' rel='stylesheet' type='text/css'> </head> <body> This is a test </body> <script> $(document).ready(function(){ tester(); }); </script></html>\[/code\]And here's my callbackclient.js:
\[code\]function tester(){ console.log("test");}\[/code\]When I hit \[code\]localhost/projects/callback\[/code\] the browser displays "This is a test" as expected, but I get an error in the console: \[code\]Uncaught ReferenceError: tester is not defined\[/code\]I get the same if I try to run tester(); from console directly, yet \[code\]$("head")\[/code\] correctly selects the head element which I guess means jQuery is being loaded fine.I must have missed something fundamental - someone please enlighten me!
\[code\]function tester(){ console.log("test");}\[/code\]When I hit \[code\]localhost/projects/callback\[/code\] the browser displays "This is a test" as expected, but I get an error in the console: \[code\]Uncaught ReferenceError: tester is not defined\[/code\]I get the same if I try to run tester(); from console directly, yet \[code\]$("head")\[/code\] correctly selects the head element which I guess means jQuery is being loaded fine.I must have missed something fundamental - someone please enlighten me!