javascript - jQuery $.ajax response empty, but only in Chrome -


I have finished every opportunity of research to solve this one, so hopefully someone else I I will not think anything.

The relatively straight forward setup, I have an HTML page with some JavaScript that makes an AJAX request to the URL (in the same domain), the Java Web App in the background does its content and partial HTML Returns the page (no HTML, head or body tags, head Content) which should be inserted at a particular point in the page.

All look very easy and I work in IE, Firefox and Safari, but not in chrome, the target element ends just empty and if I look at the resource request in the Chromes Developer Tool The feedback content is also empty.

All are very misleading, I have tried that to solve it, innumerable things and I'm just out of ideas. Any help would be greatly appreciated.

  var container = $ ('# container'); $ Data type ('parameter = value and other = value2'), data type: 'html', cache: false, beforeSend: (type: 'GET', url: '/ path / to / local / url' Request, fulfillment: requestComplete, success: requestSuccess, error: requestError}); Function data (parameter) {var dictionary = {}; Var pairs = parameter. Split ('& amp;'); (Var i = 0; i & lt; pairs.length; i ++) {var of value pairs = add [i] .split ('='); Dictionary [keyValuePair [0]] = KeyWellPear [1]; } Return dictionary; } Before the function request () {container.fund ('. Message.error'). Hide (); 

All this is executed in $ (document) .ready (function () {});

Cheers, Jim

@ Oleg - Additional information was requested, an example of the response to the AJAX call.

  & lt; P class = "message error hidden" & gt; An unknown error occurred while trying to retrieve data, please try again soon. & Lt; / P & gt; & Lt; Div class = "timeline" & gt; & Lt; One square = "icon shuttle-last" rel = "max_id = 16470650733 and page = 1 & amp; q = some" & gt; New data & lt; / A & gt; & Lt; One square = "icon shuttle-next" rel = "max_id = 16470650733 and page = 3 & amp; q = some" & gt; Older data & lt; / A & gt; & Lt; / Div & gt; & Lt; Ol class = "social" & gt; & Lt; Li class = "even here" & gt; & Lt; Div class = "avatar" & gt; & Lt; Img src = "sphere_normal.gif" /> & Lt; / Div & gt; & Lt; P & gt; Some content & lt; Br / & gt; & Lt; Span class = "Published" & gt; 18 June 2010 11:29:05 AM & lt; / Span & gt; - & lt; One goal = "_ blank" href = "" & gt; Direct link & lt; / A & gt; & Lt; / P & gt; & Lt; / Li & gt; & Lt; Li class = "weird" & gt; & Lt; Div class = "avatar" & gt; & Lt; Img src = "sphere_normal.gif" /> & Lt; / Div & gt; & Lt; P & gt; Some content & lt; Br / & gt; & Lt; Span class = "Published" & gt; 18 June 2010 11:29:05 AM & lt; / Span & gt; - & lt; One goal = "_ blank" href = "" & gt; Direct link & lt; / A & gt; & Lt; / P & gt; & Lt; / Li & gt; & Lt; / Ol & gt; & Lt; Div class = "timeline" & gt; & Lt; One square = "icon shuttle-last" rel = "max_id = 16470650733 and page = 1 & amp; q = some" & gt; New data & lt; / A & gt; & Lt; One square = "icon shuttle-next" rel = "max_id = 16470650733 and page = 3 & amp; q = some" & gt; Older data & lt; / A & gt; & Lt; / Div & gt;  

Chrome stays on its own foot with the protection of local files, so No AJAXing relative paths with local files:


Comments