Hi, I''m facing a problem with the form submiting. I use prototype framework. The form is set correctly using the niceform system and the form send the informations using javascript (onclick="javascript:sendData();") I use the GET method to tranfer the parameters to a page (valid.php3) when I get the response from the server the page change and the url become url+all the parameters that I send I want that the page stay at showing the response not showing what I have send to the document valid.php3 --~--~---------~--~----~------------~-------~--~----~ 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 think there is more than one issue. 1st) change your method to post 2nd) move the onclick (i presume on the submit button) to onsubmit in the form tag proper. 3rd) make sure the function returns false to stop the page from changing at least i think thats how it goes, someone please correct me if i am On 9/14/07, samat <ayo.enn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi, > I''m facing a problem with the form submiting. > I use prototype framework. The form is set correctly using the > niceform system and the form send the informations using javascript > (onclick="javascript:sendData();") I use the GET method to tranfer the > parameters to a page (valid.php3) when I get the response from the > server the page change and the url become url+all the parameters that > I send > I want that the page stay at showing the response not showing what I > have send to the document valid.php3 > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sep 14, 2007, at 8:38 AM, Brian Williams wrote:> i think there is more than one issue. > > 1st) change your method to postHe''s given no reason to make this assumption. In general (there are some minor exceptions), use GET if doing a db SELECT, and POST if doing an UPDATE, INSERT, DELETE, etc.> 2nd) move the onclick (i presume on the submit button) to onsubmit > in the form tag proper.Agreed.> 3rd) make sure the function returns false to stop the page from > changingThat depends on how the observer was assigned. A more consistent (and cross-browser) way would be to use Event.stop. TAG --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 9/14/07, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote:> > > > On Sep 14, 2007, at 8:38 AM, Brian Williams wrote: > > > i think there is more than one issue. > > > > 1st) change your method to post > > He''s given no reason to make this assumption. In general (there are > some minor exceptions), use GET if doing a db SELECT, and POST if > doing an UPDATE, INSERT, DELETE, etc.the OP said ''I want that the page stay at showing the response not showing what I have send to the document valid.php3'' thats why i suggested this; perhaps i mis-understood what he was asking for.> 2nd) move the onclick (i presume on the submit button) to onsubmit > > in the form tag proper. > > Agreed. > > > 3rd) make sure the function returns false to stop the page from > > changing > > That depends on how the observer was assigned. A more consistent > (and cross-browser) way would be to use Event.stop.I''ll look into this one. TAG> > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---