Ajax Call executing twice?
<p>Why is this ajax call giving me back both answers? First, and in a barely noticeable way the correct answer, then the other one?</p>

<p><strong>The Form page</strong></p>

<pre><code>   $(document).on('click','.save-action',function(){
                    //var text = tinyMCE.get('#action-desc').getContent(); 
                    if($("#form-save-action").validationEngine('validate'))
                    {

                        $.ajax({
                            type: "POST",
                            cache: false,
                            data: $("#form-save-action").serialize(),
                            url:"modules/actions/insertaction.php",      

                            success : function (data) {

                               $("#response-message").html(data);

                            }
                        })
                    }

                }); 
</code></pre>


  
    Adicionar Acção
    
      Nome da acção 
      
        

      


      Descrição
      

          

      
      
      
          <hr>
          Gravar
      
    
  


<p><strong>Insertaction.php</strong></p>

<pre><code>$exists = $action-&gt;actionExists($actionName);



if($exists == 0)
{
        $action-&gt;insertAction(array($actionName,$action-&gt;clearContent($actionDesc),1));
        echo 'Acção adicionada com sucesso!'; 
}
if($exists &gt;= 1)
{
      echo 'Acção já existe!'; 
}
</code></pre>

<p>So if I click in the .save-action button, it gives me back first the correct answer, then the other one.</p>

<p>PS: the ajax call is wrapped in a <code>$(document).ready</code>function</p>
