View Full Version : Firefox truncating responseXML but not responseText?

06-18-2009, 01:41 AM
First time posting. Apologies if this has been covered, maybe i'm just using the wrong terms, but my searching has yielded no help yet.

I'm just stepping into my first AJAX solution and running into a major hang up.

My php script creates the html for a select dropdown element populated from the database based on user input. The php also places this html in well formatted xml along with other form elements in other xml nodes. While watching all http requests, i can see that the server is sending a complete well structured xml document down to the browser. So far so good.

Now if i write out the contents from the xmlHTTPRequest Object in javascript via responseText, I can see all the contents of my (fairly large, but not unusable) select box right on the page. Of course all the '<'s come out as '&lt;'s in the source and are rendered in the brower as text, but the data is clearly present and complete.

However if I access the contents via responseXML, my select box contents are cilpped midway through in Firefox, but not Safari (not sure about IE yet). The really wierd part is that its not just cutting off the end of the xml text string which would remove the </select> close select tag. That remains (viewable by 'view generated source' in the Web Developer extension) and the option items in the select box are removed starting from the end and going back a certain number of characters it seems (~4113 is the most it will keep). However the last close option tag is always intact too.

Safari behaves perfectly well (I'm on a mac by the way with current versions of both browsers). I'm perfectly stumped. I appreciate any help that can be offered. Take Care and thanks for reading