You can combine Javascript, HTML, and CSS to show much more beautiful and sophisticated alerts (e.g., modal windows) than alert
browser default.
The browser has no control over these custom alerts and does not give the user the option to block them.
A library you can use for this is the VEX. You can see it working by running the code example below:
vex.defaultOptions.className = 'vex-theme-os';
function mostreFeedback(mensagem) {
jQuery("#feedback").attr('value', mensagem);
}
function confirmacao() {
vex.dialog.confirm({
message: 'Você tem certeza que deseja fazer isso?',
callback: function(resultado) {
if (resultado) {
mostreFeedback("Ação confirmada com sucesso");
} else {
mostreFeedback("Ação cancelada");
}
}
});
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/2.3.3/css/vex-theme-os.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/vex-js/2.3.3/css/vex.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/vex-js/2.3.3/js/vex.combined.min.js"></script>
<input type="button" value="Confirmação" onclick="confirmacao()" />
<br />
<br />
<input id="feedback" type="text" readonly style="width: 100%" />
Change your browser settings. See http://forums.mozillazine.org/viewtopic.php?f=25&t=2172671&p=10737317#p10737317
– Heloisa Rocha
@Heloisarocha tried to set up the successive_dialog_time_limit but did not resolve
– SneepS NinjA