How can i stay on the same page?
<p>i have checkboxes on my page and remove values from db with ajax. The problem is that when i click for removing, it sends to me the index page , what i want is that staying where i remove the checkbox.</p>

<p>This is my code. What might be the changes , if i want to stay on the same page.</p>

<pre><code>function deleteData() {
    var artistIds = [];
    $("input[name='artist[]']:checked").each(function () {
        artistIds.push($(this).val());
    });
    alert(artistIds);
    var sitepath = 'http://www.sinemalar.com/';
    $.post('/management/deleteDataAjax2', {
        json: JSON.stringify({
            'artistIds': artistIds
        })
    }, function (response) {
        alert("Başarıyla silindi");
        window.location.replace(window.location.pathname);
    });
}
</code></pre>
