Double POST using form_remote_tag ?

Using form_remote_tag I get this generated HTML:

<form onsubmit="new Ajax.Request('/article/ajax_add_comment?submit_button_id=submit_comment_button_3000', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;" method="post" action="/article/ajax_add_comment?submit_button_id=submit_comment_button_3000">

As you can see, it has an onsubmit and an action. The onsubmit sends an Ajax request. Sometimes, on some browsers (Firefox 3.0.1 on Windows) this sends 2 HTTP POST requests to our server. One is Ajax one is not.

the users are NOT clicking the button twice. The page has lots of ads and javascript on it and as well the above javascript is generated from a previous Ajax call. so there is room for slowness on the browsers part - which may cause part of the issue with the double-submit occurring about 5% of the time.

Does anyone know of an issue here?

Mike

Hi Mike Papper

Can you paste your original form_remote_tag code?

Sijo