ajaxStart doesnt get triggered

ajaxStart doesnt get triggered

Hey,

I use the ajax-Events to fadeIn and fadeOut a Spinner evertime a ajax-request is processing.

It works well - except one case:

- I have an Ajax-Form
- I click a button outside the form and this button fires the click()-event from the submit-button inside the form
- now the ajaxStart() doesnt get triggered, but ajaxStop() and ajaxComplete works

The Form looks like:

  1. <form onsubmit="jQuery.ajax({data:jQuery.param(jQuery(this).serializeArray()) + '&amp;authenticity_token=' + encodeURIComponent('SHY+aZ92E9MbBfWnvj7UYgJPViBn8z0ufarWbQDdyjU='), dataType:'script', type:'post', url:'inventory_positions/create_card/3829?bpsession=ncq1t4ux'}); return false;" method="post" id="form_pmac6prj" class="detail_state" action="inventory_positions/create_card/3829?bpsession=ncq1t4ux"><div style="margin: 0pt; padding: 0pt; display: inline;"><input type="hidden" value="SHY+aZ92E9MbBfWnvj7UYgJPViBn8z0ufarWbQDdyjU=" name="authenticity_token"/></div>
      <input type="hidden" value="3829" name="card_id" id="card_id"/>

    <p><label>Menge</label><input type="text" size="30" onchange="mark_as_changed(this, 3829)" name="inventory_position[amount_field_quantity]" id="inventory_position_quantity" class=" amount_field" card_item_id="19953" autocomplete="off"/></p>
      <input type="submit" value="icons/check.png" scope="fields" name="commit" class="invisible submit"/>
    </form>





The Button:
  1. <input type="image" title="Speichern" src="/images/checkmark.gif?1276077345" onclick="$j('#card_3829__content .submit').click(); return false;" class="submit card_button"/>
The ajaxStart-Handler:

  1. $j(document).ready(function()
    {
      $j(this).ajaxStart(function()
      {
        //console.log("> > > $j(document).ajaxStart();");
        $j("#spinner").fadeIn(750);
      }
      );






  2. ...

May someone put me a light on?

Thanks in advance