获取错误无法加载ajax

This is a part of my entire script(the entire script was a bit lengthy so here it is @fiddle). it was working fine but all of a sudden it has stopped working and i am getting error in console saying Failed to process ajax !

$.ajax({
    type: 'post',
    url: 'test2.php',
    dataType: 'json',
    data: {
        txt: txtbox,
        hidden: hiddenTxt
    },
    cache: false,
    success: function(returndata) {
        $('#first').html(returndata[0]);
        $('#second').html(returndata[1]);
        $('#third').html(returndata[2]);

        $('#fourth').html('<img src="' + returndata[3] + '" height="125" width="125">')
        console.log(returndata);

        $("#walkaway").show();
        $("#submitamt").show();
    },
    error: function() {
        console.error('Failed to process ajax !');
    }

});

Can anyone tell me what is the issue.