I have this HTML code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MyPage</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="/scripts/FileFunctions.js"></script>
</head>
<body>
</body>
</html>
and this "FileFunctions.js" file
function addField(){
$('form input:file').last().after($('<p><input type="file" name="files[]" id="file" /><br /></p>'));
};
but if I load the page, my file "FileFunctions.js" is not loaded... The javascript console says
Uncaught SyntaxError: Unexpected token < FileFunctions.js:1
but I can't find out what is wrong with these codes... Thanks for any ideas
404 Not Foundpage full of HTML content instead of JavaScript code. Have you used Firebug to ensure the file you're downloading is the file you're expecting to download?