[rails 2.3.2] ajax form issue

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

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

Frederick Cheung 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
...

Kad Kerforn wrote:

Frederick Cheung 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

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Greg Donald 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>