ACC SHELL
$(document).ready(function() {
$('#jq_button_ajaxsend').click(function() {
$('#AJAXresult').text('');
sendAjax($('#jq_input_offset').val());
});
});
function success_function(json) {
if (json.error) {
alert(json.html);
} else {
$('#AJAXresult').prepend($('<p></p>').html(json.html));
$('#jq_input_offset').val(json.offset);
if (!(json.finished)) {
sendAjax(json.offset);
}
}
}
function sendAjax(offset) {
$.ajax({
url : 'ajaxsend?format=json',
type : 'POST',
data : {
id : $('#jq_hidden_id').val(),
offset : offset
},
dataType : 'json',
timeout : 8000,
success : success_function
});
}
ACC SHELL 2018