Hi there, Im working in on a form validation class for prototype 1.6.0rc0, after the submit i want to verify the form input by ajax. Here''s a snippet of my code; ClassMethod:function(){ this.form.observe(''submit'', function(ev){ ev.stop(); this.form.request({ onComplete:function(t){ if(this.verify(t)){ /*** submit the form ***/ } }.bind(this) }); }.bind(this)); } Take a look at the comment, this is the point where the form should be submitted.., yes i know i stopped it but otherwise the form would submit before the request() What are my options ^^ --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not quite sure what you''re trying to do here... Form#request submits form via ajax (sends request to the address from form''s "action" attribute with serialized form) Are you trying to submit form the regular way after it''s been submitted via ajax? If so, then this.form.submit() will do the trick (though it makes no sense to me) -- View this message in context: http://www.nabble.com/submitting-after-ajax-tf4424203.html#a12625134 Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Your completely right, it made no sense at all what i was trying to do :] Fixed it already (the real ajax-way ;]) On 12 sep, 00:21, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not quite sure what you''re trying to do here... > Form#request submits form via ajax (sends request to the address from form''s > "action" attribute with serialized form) > Are you trying to submit form the regular way after it''s been submitted via > ajax? > If so, then this.form.submit() will do the trick (though it makes no sense > to me) > -- > View this message in context:http://www.nabble.com/submitting-after-ajax-tf4424203.html#a12625134 > Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---