Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
Hiding and displaying element which is part of a jQuery Modal dialog

I have the below HTML which resides inside a modal dialog. As can be seen when it loads then by default it is not visible.

<span runat="server" id="GESiCountrySelection" style="display: none" clientidmode="Static">
    <label>GESi Countries in Scope</label><span style="color: red">*</span>
    <select runat="server" id='GESiCountriesSelection' clientidmode="Static" multiple></select>
</span>

I have another piece of jQuery code which I use for displaying and hiding it based on certain condition.

$(document).on('change', "#Stage", function () {
    if ($('#recordTypeGES').text() == "True") {
        if (this.value == "Closed Won") {
            $("#GESiCountrySelection").show();
        }
        else {
            $("#GESiCountrySelection").hide();
        }
    }
});

So when another dropdown inside the modal changes its value I catch that event and hide or display the above HTML element. But even after its hitting the JavaScript code and passing through .show or .hide it is not changing the state.

The strange thing is if I do a full refresh of the page then it starts working which means it catches the dropdown change event and shows or hides the HTML element. I have an update panel inside the page so when I change the state of the page it doesn't post back and does not do a full refresh. Not sure if that is messing something up.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda