0
I have a content that is inside a partial view. There are situations where I need to open popup’s that change only buttons and their actions.
But the content is always the same as the partial view. I believe that when rendering the page, it is being created the same partial view for each popup and with it, the id’s of the HTML components repeat themselves. This messes up the whole code.
For example lose reference to grid, of tabpage.
Does anyone know how to repurpose it partial view in several popup’s?
<div id="divModal">
@Html.Partial("DadosComuns")
</div>
<script>
$(document).ready(function () {
dialog-01 = $("#divModal").dialog({
autoOpen: false,
title: "Tela 01",
modal: true,
buttons: {
"Ação A": function() {
AcaoA();
},
"Fechar ": function() {
dialog-01.dialog('close');
}
}
})
dialog-02 = $("#divModal").dialog({
autoOpen: false,
title: "Tela 02",
modal: true,
buttons: {
"Ação B": function() {
AcaoB();
},
"Ação C": function() {
AcaoC();
},
"Fechar ": function() {
dialog-02.dialog('close');
}
}
})
dialog-03 = $("#divModal").dialog({
autoOpen: false,
title: "Tela 02",
modal: true,
buttons: {
"Ação D": function() {
AcaoD();
},
"Ação E": function() {
AcaoE();
},
"Fechar ": function() {
dialog-03.dialog('close');
}
}
})
}
</script>
You need to create an example in code. I imagined what this is about, but I can’t be sure.
– Jéf Bueno
Vixi.... the code is too big.... I will try to summarize:
– Heitor H. Sichin
Do a [mcve].
– Jéf Bueno
This example I put above serves?
– Heitor H. Sichin