i’m starting to use modal dialog; i create this code reading, and with the help of few people
$('Form').submit(function(e) {
var url = "controllers/EntradaPedidos";
var dialog = $("#dialog");
if ($("#dialog").length == 0) {
dialog = $('<div id="dialog" style="display:hidden"> Los datos ingresados son:</div>').appendTo('body');
}
dialog.load(
url,
{}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
function(responseText, textStatus, XMLHttpRequest) {
dialog.dialog({
close: function(event, ui) {
dialog.remove();
},
modal: true,
buttons: {
Si: function() {
$(this).dialog("close");
//EntradaPedidosProducto('Form');
},
No: function() {
$(this).dialog("close");
}
},
width: 460,
resizable: true
});
}
);
return false;
});
<div id="dialog" title="Datos Cliente:" style="display: none;">
<p>
<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
Estos son los datos que ingreso:
</p>
<p>
Desea Continuar?
</p>
so this are my doubts/questions
what i’m doing here
var url = "controllers/EntradaPedidos";
i want to change window if the user push yes(si)
Si: function() {
$(this).dialog("close");
//EntradaPedidosProducto('Form');
},
how i do that
And finally, how can i push the data of the form on the modal dialog
Setting the url to your ActionMethof called “EntradaPedidos” in a controller named “controllers” to a javascript variable called “url”. This url will be used in the dialog.load method. (the dialog will load the content received from executing this action method)
If you want to save the value, do it here