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 })

Of course this means the you have to update the element upon success
yourself instead of IPE doing it for you...

$('your_field_id').update('the new value')

-justin

On Thu, Apr 17, 2008 at 2:53 PM, Aart Nicolai <[EMAIL PROTECTED]> wrote:
> 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 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).
> >
> > Why not just perform the validation on the server, where you have more
> control?
> >
> > -justin
> >
> >
> >
>
>
>
> --
> Groet,
>
>
>
> Aart
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to