You may think JS alert is boring and less flexible. You can use Sweet Alert. You can download and see the demo of sweet alert from:
http://t4t5.github.io/sweetalert/
Then initialize the plugin by referencing the necessary files (js and css):
<script src="sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert.css">
Example 1: error message:sweetAlert("Not Allowed", "Average of Chair's Recommended Step exceeds 1.25!", "error");
result:
Example 2: error message:
sweetAlert({
title:" Are you sure?",
text:"You will not be able to edit.",
type:"warning",
showCancelButton:true,
confirmButtonClass: "btn-danger",
confirmButtonText: "Yes, Submit & Lock",
confirmButtonColor: "#DD6B55",
cancelButtonText: "Cancel",
closeOnConfirm: true,
closeOnCancel:true
},
function(response){
if(response == true){
}else{
}
});
result: