There is a ping.php file, which is works great on its own:
Ping the given host, and shows the ping result immediately row by row on a web-page.
But I would like to show the ping result in a jQuery Dialog box,
Similarly, row_by_row.
Here is the jQuery code:
$(function() {
var tag = $("<div></div>");
$("#button").on('click', function() {
$.ajax({
url: "/modules/ping.php?host=172.16.1.1",
success: function(data) {
tag.html(data).dialog({title: 'Ping', modal: false}).dialog('open');
}
});
});
});
But in this case the Dialog box only appears (and show the result), when the ping.php Completed the run, and I do not see the ping result row by row! This is not good.
Is it possible to fix this?