Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13851
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Subject | Re: HTML head code gets into XHR.responseText |
| Newsgroups | comp.lang.javascript |
| References | <hh5gq7lberg5v98k5b4j45ijr2fuv93ahm@4ax.com> |
| Date | 2012-05-07 19:31 +0000 |
| Message-ID | <4fa822fa$0$2733$a8266bb1@newsreader.readnews.com> (permalink) |
| Organization | readnews.com - News for Geeks and ISPs |
On Mon, 07 May 2012 15:03:55 -0400, Puzzled wrote: > Somehow - I'm sure the explanation is simple and utterly boneheaded on > my part - the guy who XHRs the parent is also getting the program's > <head> code returned in the XHR.responseText buffer preceding the text > that it asks for. The url on the server that's being called is including some (x)(ht)ml head output in the response to the XHR request. Do your XHRs return data structured as xml, json or something else? Fix the server end. You probably need to not include whatever outputs the document head in that part of the server code, or if the url responds to both normal page requests and XHRs, send something in the XHR that the server end sees as saying "this request is an XHR" and causes it to suppress generating the document header. Rgds Denis McMahon
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
HTML head code gets into XHR.responseText Puzzled <scratching.head@example.com> - 2012-05-07 15:03 -0400 Re: HTML head code gets into XHR.responseText Denis McMahon <denismfmcmahon@gmail.com> - 2012-05-07 19:31 +0000
csiph-web