I am writing a word/name generator. On my local computer the script works fine but when uploaded, the jQuery is not able to load the text file and I get a 404 not found error. The text file is there, I have checked a number of times. Here is the simplified code: http://namepicker.site11.com/test.html
Thank you for any advise,
Todd
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JQuery-Load Text File</title>
<script type="text/javascript" src="./js/jquery-1.4.3.min.js"></script>
<script type="text/javascript">
function loadXML()
{
var file= './names/names.txt';
$.get(file, function(data) {
alert(data);
});
}
</script>
</head>
<body onload="loadXML();">
</body>
</html>
http://namepicker.site11.com/names/names.txt
The file does not exist, It needs to be there to be loaded. Try creating it and see if your having the same issues.
EDIT:
http://namepicker.site11.com/names/
File does seem to exist, perhaps check the CHMOD settings on the files.