I am displaying success msg after inserting records in database in javascript alert like this:
echo '<script type="text/javascript">
$(document).ready(function() {
alert("Record inserted");
});
</script>';
It displays alert message after half page load and then after clicking ok in alert, rest of the page is rendering. How can I display alert message after full page load?