In a Facebox window (running well with an html form) , I have now an Ajax form written <form class="tabular" onsubmit="new Ajax.Request(''/intranet-dev/welcome/infos_send'', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" method="post" action="/intranet-dev/welcome/infos_send"> .. </form> but when submitted , the request.xhr? => false what could be wrong ? what did I miss ? thanks for any enlightenment erwin von breizh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 24, 1:08 pm, Kad Kerforn <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> In a Facebox window (running well with an html form) , I have now an > Ajax form written > > <form class="tabular" onsubmit="new > Ajax.Request(''/intranet-dev/welcome/infos_send'', > {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); > return false;" > method="post" action="/intranet-dev/welcome/infos_send"> > .. > </form> >One possibility is that if the javascript in your onsubmit raises an exception then the browser falls back to normal form submission (eg if you don''t have the prototype javascript library loaded) Fred> but when submitted , the request.xhr? => false > > what could be wrong ? what did I miss ? > > thanks for any enlightenment > > erwin von breizh > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Mar 24, 1:08�pm, Kad Kerforn <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> > One possibility is that if the javascript in your onsubmit raises an > exception then the browser falls back to normal form submission (eg if > you don''t have the prototype javascript library loaded) > > FredThanks Frederick, good shot... I forgot to read the Firebug console .. when submitting the form... Error : $(form).getElementsByTagName is not a function Source File : http://aelmat.local/intranet-dev/javascripts/prototype.js?1231845708 Line : 3418 I am also using jquery yo display a facebox in which the form is displayed... I don''t think there is any problem in using both libraries ... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kad Kerforn wrote:> Frederick Cheung wrote: >> On Mar 24, 1:08�pm, Kad Kerforn <rails-mailing-l...-ARtvInVfO7m5VldFQK4jKA@public.gmane.orgt> >> wrote: >>> >> One possibility is that if the javascript in your onsubmit raises an >> exception then the browser falls back to normal form submission (eg if >> you don''t have the prototype javascript library loaded) >> >> Fred > > Thanks Frederick, good shot... I forgot to read the Firebug console .. > when submitting the form... > > Error : $(form).getElementsByTagName is not a function > Source File : > http://aelmat.local/intranet-dev/javascripts/prototype.js?1231845708 > Line : 3418 > > I am also using jquery yo display a facebox in which the form is > displayed... I don''t think there is any problem in using both libraries > ...I looked into the facebox div in the source code, I remember reading comments about having ajax form IN a table... could it be the point ? I attached the facebox div code Attachments: http://www.ruby-forum.com/attachment/3483/facebox_div.txt -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Mar 24, 2009 at 9:32 AM, Kad Kerforn <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am also using jquery yo display a facebox in which the form is > displayed... I don''t think there is any problem in using both librarieshttp://docs.jquery.com/Using_jQuery_with_Other_Libraries -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Donald wrote:> On Tue, Mar 24, 2009 at 9:32 AM, Kad Kerforn > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> I am also using jquery yo display a facebox in which the form is >> displayed... I don''t think there is any problem in using both libraries > > http://docs.jquery.com/Using_jQuery_with_Other_Libraries > > > > -- > Greg Donald > http://destiney.com/Thanks a lot , just adding ... (Fred shot 1 help me too, looking at the Firebug console to see that there was an error... so ajax called did not happen ... ) <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function($) { }) </script> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---