0
I have a pop-up that generates the following html code:
<a data-val-filinkbutton-type="button" href="#" id="AtribuicaoCodigo_lnkPop" onclick="openDialog(event, this, 'AtribuicaoCodigo_pop');">Regra:</a>
I need to change the text of Regra:
according to the value of a dropdown that is on the back screen, ie in Parent. I made the following code jquery:
$(function () {
$('#btnCopiar').on('click', function (e) {
if (parent.$('#TipoAtribuicao').val() === '1') {
$('#AtribuicaoCodigo_lnkPop').text('Comissionado: ');
}
else {
$('#AtribuicaoCodigo_lnkPop').text('Regra: ');
}
openDialog(event, this, 'popCopiar', null, 800, 750);
});
});
But nothing happens, it’s not changing the name, someone can tell me why?
@Sam yes.......
– Stand Alone
@Sam is a popup
– Stand Alone
@Sam but it’s right, this way (Parent) the value is coming correctly, the only thing that is not happening is the exchange of the text "Rule" pop up....
– Stand Alone
From what I understand you are changing the text of the tag "a" before it exists, try to do this after the modal is opened, via callback, timer or something else.
– gmazoni