Hi, > The point is I wanted to change my validation from dynamic (when > user type or changes the fields) to on submit only :)
:-) ! > Ok, I was thinking about this solution and using From.serialize but I > didn't want to my site to much - just simply change one thing - Option #2 can be a smallish change, you don't need all the bells and whistles. :-) A very rough untested cut: http://pastie.org/403783 That version still submits the form the old-fashioned way (form.submit), since that would be minimal impact on your current design. But of course, you can replace that with something ajaxy if you like. FWIW, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 1, 1:22 pm, Quleczka <[email protected]> wrote: > Hi, > > Thanks for your reply. > > > There are a couple of ways you can do this. > > > 1. Don't let them submit until the field is validated. > > :)))) > > The point is I wanted to change my validation from dynamic (when > user type or changes the fields) to on submit only :) > > > 2. Do the submit via XHR rather than letting the browser do it. > > Ok, I was thinking about this solution and using From.serialize but I > didn't want to my site to much - just simply change one thing - > validate username on submit not while typing :) > > > One nice thing about this is that you can do most of your validation > > code just once (on the server), rather than having to have it both on > > the server (because you *always* have to validate user input on the > > server) and on the client (for your users' convenience). > > You are right but I already have both so it's not a problem. > > > Last but not least, the other thing that's happening latey -- which > > I've seen both good and bad examples of -- is people moving away from > > the concept of "submitting" forms entirely. > > Can be nice but I want entire form to submit :) > > So my question is still open - is there any way to check something > with ajax request on submit and submit form when you have true/false > response? --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
