Hello friends, I try to do the following.
I have a page with a series of Tabs, each Tab can create a Dialog that loads by AJAX the content of a form ( link this form will be shown for each Tab that opens it), Every time I save the form data I must return a value to the tab that opened it, something like a callback .
I hope some comment, thank you.
JS called when opening a new tab "tab-option.js"
(function ($, App, url) {
"use strict";
$(function () {
$('.buscar-cliente' + idDynamic).on('click', function () {
$("#modalCliente" + idDynamic).dialog({
title: 'Partes',
closed: false,
cache: false,
href: "http://localhost/catalogos/cliente/",
queryParams: {cliente: value},
modal: true,
inline: true,
onBeforeOpen: function () {
$("#modalNuevaParte" + idDynamic).dialog('center');
}
});
});
});
}(jQuery, App, url));
JS that loads when calling the form via ajax (client.js)
(function ($, App, url) {
"use strict";
$(function () {
//Code.....
$('#guardarCliente' + idDynamic).on('click', function (e) {
//codigo para guardar datos....
// Como puedo regresar un valor ala pagina del tab-opcion.js ????
});
});
}(jQuery, App, url));