Playing with SAJAX (AJAX framework for php, ruby etc.) I found an interesting quirk.玩sajax ( Ajax的框架,对于PHP ,红宝石等) ,我发现一个有趣的奎克。 Keep this in mind while using SAJAX (unless you have already found it (or want to find) the hard way).记住这一点,而使用sajax (除非你已经找到了它(或想要寻找)硬的方式) 。

If an exported function is called with all its arguments and without the callback at the end (as the last argument) then it ignores the last argument, possibly confusing it for a callback.如果出口的功能是所谓的与所有的论点和没有回调在去年底(作为最后的论点) ,然后它会忽略过去的说法,可能混淆,它为一个回调。

This is particularly interesting because SAJAX also provides a way to pass argument by setting sajax_target_id variable.这是特别有意思,因为sajax也提供了一个方法,通过论点,通过设置sajax_target_id变数。 So it is not unusual to expect that when sajax_target_id is set then it wouldn’t search for a callback in the function arguments.因此,这并非不寻常的期望,当sajax_target_id是一套便不寻求一个回调,在功能的论点。 However that is not the way it is implemented.然而这是不是这样,这是实施。

BTW: Sajax examples are very poorly done.的BTW : sajax的例子是非常不好做。 Anyone looking at their code will get a very bad feeling about the competence of the team.任何人都看他们的代码将获得一个非常坏的感觉,关于竞争力的团队。 However the actual code is better.然而,实际代码是更好。