Does anyone know how to get the value of a text box from a modal window in another new modal window?
I have a modal window that has two buttons, I also have a key value in a textbox that I need to recover in another modal window to process that value, I tried to pass the value in the click event of a button with the following code
$("#btnno").click(function () {
$('#modalPregunta').modal('hide');
$('#modalNo').modal('show',$("#valor").val());
});
and I got it back like that
$('#modal').on('show.bs.modal', function (evnt) {
var btn = $(evnt.relatedTarget);
console.log( btn);
});
but debugging it does not get me any value