Hi, Yeah, changes to the DOM that's being torn down are probably pretty low priority.
If you really, really want to do this, I'd probably do a lib that: 1. Dynamically replaces the type='submit' buttons with type='button' buttons. 2. Watches for clicks on them. 3. In the click handler, do your form validation (since you won't get a submit event), and if it passes add a hidden element to the form using the button's value, show your covering div, and set up the delayed submit of the form. ...then reuse it. :-) -- T.J. On Oct 22, 2:32 pm, Walter Lee Davis <wa...@wdstudio.com> wrote: > On Oct 21, 2010, at 6:32 PM, T.J. Crowder wrote: > > > Instead, I'd do it in the obvious place: The form submit event: > >http://jsbin.com/aniro4/3Or you could do it on the `click` event of > > the button:http://jsbin.com/aniro4/4(I wouldn't use `mouseup` on the > > button, in case there are things the user can do that won't trigger > > the click but *will* trigger `mouseup` -- like pressing down > > elsewhere, the moving the mouse onto the button and releasing the > > mouse button. Let's defer to the UA about when the user's actually > > clicked the button.) > > Thanks, TJ, that's about what I had figured. But I have had massive > problems with hooking the submit event and modifying the DOM. In about > half the cases I've tried this, I end up with one or another browser > just not updating the DOM after the submit event has fired. The page > sits there with its tongue hanging out, and never updates. > > I have tried stopping the submit, then updating the page, then firing > this.up('form').submit() or similar, which works, but can then > introduce other problems I don't like to fix, like not passing along > the clicked submit button, for cases where I include a submit button > named delete, and key the form handler's action off of that element's > presence at the server. > > Everything's a trade-off. > > Walter -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.