jQuery AJAX request demo
HTML
<a href="#" onclick="return getSuccessOutput();"> test success </a> | <a href="#" onclick="return getFailOutput(); return false;"> test failure</a>
<div id="output">waiting for action</div>
JavaScript
function getSuccessOutput() {
$.ajax({
url: '/echo/js/?js=hello%20world!',
complete: function(response) {
$('#output').html(response.responseText);
var url = "/Controller/VisualizarBoleto/" + 00;
window.open(url, "WindowPopup", 'width=668,height=780');
},
error: function() {
$('#output').html('Bummer: there was an error!');
},
});
return false;
}