jQuery $.ajax function stops mid execution
<p>I'm making an attempt at a RESTful application but my $.ajax function stops in the middle of its execution.</p>

<pre><code>function addEntry()
{
$.ajax({
    type: 'POST',
    contentType: 'application/json',
    url: passAPI,
    dataType: "json",
    data: dataToJSON(),
    success: hideform
})
}

function hideform()
{
    $('#form').hide();
}
</code></pre>

<p>The data is put correctly in the database but the form doesn't get hidden. Anyone know why that happens ?</p>
