Doubt JavaScript function generating PostBack

0

I have this function in my system, which cleans the fields, and updates the grid:

 $('.window .close').click(function (e) {
    //cancela o comportamento padrão do link
    e.preventDefault();
    $('#mask, .window').hide();
    document.location.href = '';
    document.getElementById("<%= txtid_recebimento.ClientID %>").value = '';
    document.getElementById("<%= txtidReceita.ClientID %>").value = '';
    document.getElementById("<%= modalExercutar.InnerText %>").value = 'Cadastrar Contas a Receber';
    GridRecebimento();
});

This function is in the X (close) of the modal, but in my page there are several tabs, and when I click and execute the function, it generates postback on the page, and loses the selected tab. When I clean the fields, it does not generate the postback. How can I make sure this function does not generate the entire page postback? I have tried in many ways that I saw in the forum, but none was feasible.

    
asked by anonymous 28.07.2017 / 14:13

0 answers