Hi, > There have been some interesting issues, and mostly I've fixed (with > no help from the deprecation script, as it doesn't work).
Have you filed bug report(s) for the way/ways in which you don't think it works? (Although at this point, as it's been two and a half years since 1.6.0 was released, I'm not sure the core devs would action them.) > So, one issue I've come accross, I need to know if passing a second > parameter to the onComplete Ajax.Request is still possible. The onComplete callback still receives a second argument: "...all callbacks (except onException) are invoked with two parameters: the Ajax.Response object and the result of evaluating the X-JSON response header, if any (can be null)."[1] So as long as your PHP code is sending the result from json_encode as a response header with the name X-JSON, it should be showing up in your onComplete handler. [1] http://api.prototypejs.org/ajax/ HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Apr 30, 10:02 pm, Yaz <[email protected]> wrote: > Hi all, > > I've have been working with a *lot* of javascript code, all done in > prototype 1.5. The company I work for, has decided to upgrade > prototype libraries. So I have upgraded prototype and scriptaculous, > and about 5 others. > > There have been some interesting issues, and mostly I've fixed (with > no help from the deprecation script, as it doesn't work). > > So, one issue I've come accross, I need to know if passing a second > parameter to the onComplete Ajax.Request is still possible. > > There are a ton of Ajax.Request calls like this: > > new Ajax.Request('some_url.php', { > parameters : Parameters, > evalScripts : true, > > onComplete: function(response, arrSomeStuff){ > // from php arrSomeStuff is passed like this > json_encode(arrSomeStuff); > $('some_div').update(arrSomeStuff.value_name); > }, > > onFailure: function(response){ > // handle errors > } > > }); > > Now, I don't know why the arrSomeStuff was passed along as a second > argument, as response has the same information. But, the advantage, > was that in 1.5, that array came perfectly, you didn't have to get it > out of the response var. > > But, it doesn't work on 1.6. And there is too much code for me to try > to adapt this (30 files, each using it about 20 times). > > So far, everything works, except it doesn't execute the update because > arrSomeStuff.value_name is null. > > Any ideas?? > > Thanks!! :) > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
