JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" id='tab'>abre nuevo tab</a>
<br/>
<a href="#" id='no-tab'>es _bloqueado</a>

JavaScript

$('#tab').click(function () {
    peticionAjax(false);
});

$('#no-tab').click(function () {
    peticionAjax(true);
});

function peticionAjax(esUnaPeticionAsincrona) {
    var variable1 = "XXXvar1";
    var variable12= "XXXXvar12";
    // postserver.com es una web para hacer POST en pruebas. Siempre devuelve un 200
    $.ajax({
        type: "POST",
        url: "http://posttestserver.com/post.php",
        success: callback,
        async: esUnaPeticionAsincrona,
        data:{variable1:variable1,variable2:variable12},
    });
};

var callback = function (respuesta) {
    window.open("http://www.todoexpertos.com");
};