Mika In order to keep the code as reusable as possible, i'd just go for the custom callback method, and leave the way of handling the response to the user. That way, i (and perhaps others) will be able to implement quick and dirty error handling, and others can go with JSON or anything else.
That way, the jEditable code stays as clean as possible, without too much extra's. Leave writing custom handlers to the ones using them ;) Cheers, Miel >> Just my $0.02: I find this odd. Imagine that you want some >> processing to be >> done based on the input (i.e. server side email address checking) >> (We all > that was my attempt too at first. error checking = application logic = > write my own structures etc. I always try to write reusable code and not force users to one specific implementation (for example hardcoding effects into jEditable). I also like to keep things simple. Checking for HTTP response codes is universal approach. I do however see cases when it is not the best solution and another approach such as JSON object is more suitable. I see two possible solutions here. 1) Add an configuration option what kind of response jEditable expects. This requires less coding from end user. Bad thing is it adds bloat to jEditable since all different response types need their own handlers inside plugin code. 2) Add user defined callback (and/or callbefore) handlers. Requires more coding from the end user but everyone can write their own implementation for their own needs. Those who don't need special implementations can still use the easy defaults. Any other suggestions? -- Mika Tuupola http://www.appelsiini.net/~tuupola/ _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
<<winmail.dat>>
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
