[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread Justin Perkins
To add to the list of ideas, I would recommend you override the Ajax.InPlaceEditor#checkForEscapeOrReturn method to do what you want since that's where this submit event is getting fired from. Ajax.InPlaceEditor.addMethods({ checkForEscapeOrReturn: function(e) { if (!this._editing || e.ctrl

[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread Douglas
On Wed, Sep 17, 2008 at 5:21 PM, Tokeiito <[EMAIL PROTECTED]> wrote: > this method form#disable()/enable() disables all form thats not what i'm > searching. > > I'm searching how to disable submission on Enter key. User still can edit > text in field, he still can submit form by clicking button, b

[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread bluezehn
Just use element#disable() on the submit element. Use the API for this - it's prominently in there. On Sep 17, 9:21 pm, Tokeiito <[EMAIL PROTECTED]> wrote: > this method form#disable()/enable() disables all form thats not what i'm > searching. > > I'm searching how to disable submission on Enter

[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread Tokeiito
this method form#disable()/enable() disables all form thats not what i'm searching. I'm searching how to disable submission on Enter key. User still can edit text in field, he still can submit form by clicking button, but he can't submit it with Key Enter. Everything is simple if its regular form.

[Proto-Scripty] Re: Disable form submission

2008-09-17 Thread bluezehn
There's a method on forms you want: form#disable() or form#enable(). Then it's just a case of finding the element. You could do this through $$ or select() or have a look at the inplaceeditor source code. As I remember, the form element is stored as something like _form on each instance of the cla