‘no element found’ in firebug or firefox javascript console (part 2)
james on October 27th, 2006
I was right. If the server sends a response and the ‘Content-Type’ attribute is ‘text/xml’, you must send at least a root node so the xml parser that is built into Mozilla’s XMLHTTPRequest object doesn’t cak and give you a ‘no element found’ Javascript error.
This could be an issue for those of us who are trying to do the REST thing and send back proper status codes depending on the request method and actions taken by the server. A 204 (Updated) or 205 (Deleted) response cannot, by definition, have any content body, so sending a root node is not an option to get around this error. The server needs to determine if the response is going to have an xml content body and assign the Content-Type on the fly.


July 9th, 2009 at 3:11 am
Thanks for the info!. This “element not found” error was driving me crazy.
Greetings from spain
August 24th, 2009 at 6:02 am
i got a same error wen i try to download and use Spellcheck.com code can u explain me in detail how can i get rid of those things
November 6th, 2009 at 1:47 am
Thnak you for the info I have not been able to send correct status codes in some instances. This has given me an idea to fix
March 14th, 2010 at 3:32 am
Thanks!