What the hell does that mean?

You can get this error thrown up in your good old trusty Firebug console.
It expects a script to be returned as an ajax type datatype.

So all you have to do is change your datatype to output as XML.

For background, see programming.

This happens when your AJAX call has dataType: 'script' but the server responds with XML content instead. Firefox tries to evaluate the XML as JavaScript and throws this confusing error. I hit this when switching an API endpoint’s response format without updating the frontend code. If you’re using jQuery, just set dataType: 'xml' in your $.ajax() call and it’ll parse correctly. You can also use dataType: 'auto' to let jQuery figure out the response type from the Content-Type header.