Skip to content

Instantly share code, notes, and snippets.

@neosergio
Created July 24, 2012 22:21
Show Gist options
  • Save neosergio/3173056 to your computer and use it in GitHub Desktop.
Save neosergio/3173056 to your computer and use it in GitHub Desktop.
Confirmar cambios Modal windows
/* Dialogo para confirmar cambios */
$(document).ready(function(){
// Formateamos el botón Diálogo sencillo
$('#dialogSencillo').button();
// Damos formato a la Ventana de Diálogo
$('#dialogo').dialog({
// Indica si la ventana se abre de forma automática
autoOpen: false,
// Indica si la ventana es modal
modal: true,
// Largo
width: 300,
// Alto
height: 160,
// Creamos los botones
buttons: {
Confirmar: function() {
// ir a una url
//window.location.href="url";
$('#formulario').submit();
},
Cancelar: function() {
// Cerrar ventana de diálogo
$(this).dialog( "close" );
}
}
});
// Mostrar Diálogo Sencillo
$('#dialogSencillo').click(function(){
$('#dialogo').dialog('open');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment