I\'m having a problem with my jQuery code on http://alpha.spherecat1.com/, but the local copy works fine. As you can see if you visit the site now, the ajax call gives the f
The error is thrown from the ajax call:
error: function(xmlhttp, status, error)...
Since you are expecting a XML dataType, the call for "ajax/home.html" url will return a mime type "text/html". You might want to omit the dataType totally for jQuery's intelligent guess to kick in. E.g.:
$.ajax({ // jQuery makes me feel like a code ninja.
url: newPage,
success: function(data, status, xmlhttp){ renderPage(xmlhttp); },
error: function(xmlhttp, status, error){ alert(error); renderPage(xmlhttp); }
});
You also have the following alert()
in appendCSS
which I assume is for debugging?:
function appendCSS(filename)
{
alert(filename);
if (filename != null)
{
$("head").append("<link rel='stylesheet' id='extracss' href='"+filename+"' type='text/css' />");
}
}