Yea, that should fix the problem, return is a reserved word in javascript
On May 7, 4:22 pm, Matt Critchlow <matt.critch...@gmail.com> wrote: > try changing your parameter in the success method to something other > than return and see what happens.. > > On May 7, 10:40 am, Eli Perelman <e...@cobaltds.net> wrote: > > > Hello All, > > > I am trying to complete an Ajax request in which PHP returns a JSON- > > formed string. One of the variables inside the JSON object contains a > > path, which contains backslashes. This seems to cause a problem > > because nothing in the success function seems to run. So, I tried > > cleaning the data using dataFilter, but cannot seem to get that to > > work either. Anybody have any insight on how to accomplish this? > > > CODE: > > $.ajax({ > > async: false, > > type: "POST", > > url: ajaxHandler, > > dataType: "json", > > data: "action=getInformation&id=" + id, > > dataFilter: function(data,type) { > > data.replace(/\\/g,"\\\\"); > > return data; > > }, > > success: function(return){ > > objInformation = return.detail[0]; > > } > > });