Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

ajax response incomplete

Skip to first unread message


Nov 1, 2008, 10:48:46 PM11/1/08
I'm using ajax to post to an asp webpage. The confusing point is that
the returned response is either incomplete html text(content-type=text/
html) or DOM object with only one 'parsererror' element(content-
type=text/xml). Is it because the response(a webpage of course, less
than 100k) is too large for javascript to handle? or it's a bad
practice and there should be a better way?

Thanks in advance.


Jonas Sicking

Nov 3, 2008, 8:19:53 PM11/3/08

It should work fine if you send it with the content-type text/html. Do
note that you can't use the .responseXML property though since you are
not in fact sending XML. Use .responseText instead.

I think there might be a bug where if you use the content-type text/xml
but the content isn't valid XML, we abort downloading which means that
not even the full .responseText will be available. I haven't verified
that this is actually happens though.

But use conten-type 'text/html' and all should be good.

/ Jonas

0 new messages