I have a PopUp
window on my page but I do not want anyone to leave by giving Click
to the previous page as if it were a ShowDialog
. Usage VB.Net
I have a PopUp
window on my page but I do not want anyone to leave by giving Click
to the previous page as if it were a ShowDialog
. Usage VB.Net
From html
:
<a data-controls-modal="your_div_id" data-backdrop="static" data-keyboard="false" href="#">
From jQuery
:
$('#idDelModal').modal({backdrop: 'static', keyboard: false})
Other attributes data
:
|----------------------------------------------------------------------|
| backdrop | Incluye un elemento modal-backdrop. Como alternativa, |
| | especifique 'static' para un fondo que no cierre el |
| | modal en clic. |
|-------------|--------------------------------------------------------|
| keyboard | Con valor 'booleano: true' evita cerra el modal cuando|
| | se presiona la tecla 'escape' |
|-------------|--------------------------------------------------------|
| show | Muestra el modal cuando se inicializa |
|-------------|--------------------------------------------------------|
| remote | deprecado desde v3.3.0. Carga desde una vía remota |
| | el contenido del modal |
|-------------|--------------------------------------------------------|
I recouped the BlockUI plugin from jquery
You can find an example of how it is used, greetings.
$(document).ready(function() {
$('#prueba').click(function() {
$.blockUI({ message: $('#modal'), css: { width: '275px' } });
});
$('#yes').click(function() {
// update the block message
$.blockUI({ message: "<h1>Procesando...</h1>" });
$.ajax({
url: 'wait.php',
cache: false,
complete: function() {
// unblock when remote call returns
$.unblockUI();
}
});
});
$('#no').click(function() {
$.unblockUI();
return false;
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://malsup.github.io/jquery.blockUI.js"></script>
<input id="prueba" type="submit" value="Mostrar Modal" />
<div id="modal" style="display:none; cursor: default">
<h1>Presiona el botón para cerrar.</h1>
<input type="button" id="yes" value="Procesar" />
<input type="button" id="no" value="Salir" />
</div>
Try this code which does not allow to go back, in order to implement it, copy this code in the one of the page that you need
<script type="text/javascript">
history.forward();
</script>