You were right (as I too had suspected), the problem was not with jquery. The Chrome JS interpreter balked at a line of my code (which looked something like '[var1,var2]=somestring.split(":");' which is perhaps a bit Perlish, but which the Firefox JS interpreter didn't mind). Once I fixed that, the other problem (which did not seem to me to be related!) went away!
pw On Dec 22, 2:01 pm, John Arrowwood <jarro...@gmail.com> wrote: > I'm pretty sure it has nothing to do with jQuery. I use $.ajax flawlessly > on Safari. However, I did note that some browsers are more forgiving than > others with respect to the data and the data type matching. Make sure you > are telling your ajax call what kind of data it should expect back from the > server, and that may solve your problem. > > > > On Tue, Dec 22, 2009 at 9:51 AM, pw <pwise...@gmail.com> wrote: > > On Dec 22, 10:34 am, "T.J. Simmons" <theimmortal...@gmail.com> wrote: > > > I'd provide more detail; $.ajax should work in every browser. There's > > > more than likely an issue with the script or the response. An example > > > of what you're doing would work wonders for helping us figure it out. > > > > - T.J. > > > > On 12/22/09, pw <pwise...@gmail.com> wrote: > > > > > > I have a script which relies on $.ajax to retrieve data from my > > > > > server. It works flawlessly in Firefox (Gecko), but is broken in > > > > > Chrome and Arora (two webkit-based browsers). Are there known > > issues, > > > > > or do I need to provide more detail? > > > OK, here's some more detail. The actual application is password > > protected, because it contains student data. I have a student > > 'facebook' in which each student in a class becomes a 'property' of > > the class roll, which is globally defined, in a variable called 's', > > so "var s = {};" Then a function populates this object with the > > students and some properties, e.g. s['jsmith'].absent = new Array(); > > in which will be recorded student absences. The user then checks a > > box by the student picture, and selects 'Mark Absent' from a menu. > > The date is pushed onto the s['jsmith'].absent array. This works in > > Firefox, but in Chrome I get "TypeError: cannot read property 'jsmith' > > of undefined". I'm saving the data to my server as a data string, > > with $.ajax > > ({async:"false",cache:"false",url:"<cgiscript>",contentType:"text/ > > plain",processData:false,data:dataString,type:"POST"}); and retrieving > > it with $.ajax > > ({dataType:"text",cache:"false",url:"<filename>",success:function > > (data,status){ eval(data); }); > > > It's entirely possible that what I'm seeing has nothing to do with > > jquery but is rather due to the webkit javascript implementation, so > > apologies if that's so. But if anyone could point me in the right > > direction, I'd appreciate it. > > > pw > > -- > John Arrowwood > John (at) Irie (dash) Inc (dot) com > John (at) Arrowwood Photography (dot) com > John (at) Hanlons Razor (dot) com > --http://www.irie-inc.com/http://arrowwood.blogspot.com/