JSFiddle - React, Tailwind, and code Playground

by eddiarnoldo

JavaScript

function testAjax(){
alert("In test Ajax");
$.ajax({
    type: "GET",
    url: "http://xyz.com/",
    data:   "param1=value1" +
        "&target=http://abc.com"
    ,
    success: function(data, textStatus, xhr) {
            alert("Success ");
            window.location.href = "http://abc.com";
    },
    error: function(data) {
        alert("Success");
    },
    async: false
});
}
testAjax();