[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-19 Thread Justin Perkins
On Sat, Apr 19, 2008 at 9:31 AM, Aart Nicolai <[EMAIL PROTECTED]> wrote: > That's right. Server side validation is always required, using client side > validation you can save a roundtrip to the server. From my point of view > client side validation should be an option for IPE. I recommend extend

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-19 Thread Aart Nicolai
That's right. Server side validation is always required, using client side validation you can save a roundtrip to the server. From my point of view client side validation should be an option for IPE. On 19/04/2008, Garito <[EMAIL PROTECTED]> wrote: > > > The advantage is pretty clear: you save a

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-19 Thread Garito
The advantage is pretty clear: you save a server connection only to know that the field is mandatory or a date-only data The server side validation is needed too but why not to save time, connections and server load with a very low effort? On 18 abr, 17:42, "Justin Perkins" <[EMAIL PROTECTED]> wr

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-18 Thread Brian Williams
On Fri, Apr 18, 2008 at 11:42 AM, Justin Perkins <[EMAIL PROTECTED]> wrote: > > On Fri, Apr 18, 2008 at 8:40 AM, Garito <[EMAIL PROTECTED]> wrote: > > > > Sorry Justin but > > "The InPlaceEditor is not really intended to behave like that. " is a > > not very realistic response. I think the vali

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-18 Thread Justin Perkins
On Fri, Apr 18, 2008 at 8:40 AM, Garito <[EMAIL PROTECTED]> wrote: > > Sorry Justin but > "The InPlaceEditor is not really intended to behave like that. " is a > not very realistic response. I think the validation is a so normal Validation on the server is normal, but imo validation on the cli

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-18 Thread Garito
Sorry Justin but "The InPlaceEditor is not really intended to behave like that. " is a not very realistic response. I think the validation is a so normal need and it will be mandatory in a serious project, don't you think so? The other ways is a patch temporary solution, if not I can't consider I

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Justin Perkins
The documentation is lacking at the moment, due to being moved around. I've found it's best to just read the source code, but I think a new documentation site is in the works. -justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Aart Nicolai
It seems like "htmlResponse" is undocumented.. are there more? On 17/04/2008, Aart Nicolai <[EMAIL PROTECTED]> wrote: > > Just in time.. This works better.. > As interim solution a made a list hidden text fields to validate later on, > but this works better.. > > Thanks! > > On 17/04/2008, Justin

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Aart Nicolai
Just in time.. This works better.. As interim solution a made a list hidden text fields to validate later on, but this works better.. Thanks! On 17/04/2008, Justin Perkins <[EMAIL PROTECTED]> wrote: > > > Well you can turn off htmlResponse in your InPlaceEditor, then return > javascript to be exe

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Justin Perkins
The InPlaceEditor is not really intended to behave like that. You can either cancel the edit, in which case the Ajax will not occur, or you can submit the changes in which case there is nothing you can do to stop the Ajax from being sent (aside from overriding the handleFormSubmission method).

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Justin Perkins
Well you can turn off htmlResponse in your InPlaceEditor, then return javascript to be executed, such as doing an alert like you desire or, for a better user experience, displaying an error message next to the edit field. new Ajax.InPlaceEditor('your field_id', '/some/url', { htmlResponse:false }

[Rails-spinoffs] Re: scriptaculous InPlaceEditor validation

2008-04-17 Thread Aart Nicolai
Thanks for the quick reply. I validate on the server as well, but the generated error message appears in the InPlaceEditir field. I just would like to see an javasscript alert.. On 17/04/2008, Justin Perkins <[EMAIL PROTECTED]> wrote: > > > The InPlaceEditor is not really intended to behave like t