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: [URL=“http://namepicker.site11.com/test.html”]http://namepicker.site11.com/test.html
The file does exist: http://namepicker.site11.com/names and there is text in it.
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>