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

281
Visualizações
B2C- Unable to hide element with JS in my custom policy

In my custom policy, I try to hide email_intro label but without success : validateEmail

- This is my html code :

<div id="api" data-name="Unified">
    <form id="attributeVerification">
        <div id="attributeList" class="attr">
            <ul>
                ...
                <li class="TextBox">
                    <div class="attrEntry">
                        <div>
                            <div class="verificationInfoText" id="email_intro" style="display: 
                            inline;" aria-hidden="false" aria-live="polite" 
                            role="alert">Verification is necessary. Please click Send button. 
                            </div>
                        ...
                        </div>
                    </div>      
                </li>
                ...                             
            </ul>
        </div>
        <div class="buttons">
            ...         
        </div>
    </form>
</div>

- My JS code

var intro = document.getElementById("email_intro");
intro.style.setProperty('display','none');

Could someone know what the error might be please?

PS : I do the same thing to other elements and it works!!

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Thank you Nicolas and micahlt for your valuable discussions. Posting your discussions as answer to help other community members.

This seems to be an issue occurred due to style sheet miss match. Targeting the correct style sheet [element.style {display: inline; }] to class name (.verificationInfoText) solved the issue.

about 4 years ago · Juan Pablo Isaza Relatório

0

@micahlt you were right, I inspecte the page and that was an other stylesheet injected element.style {display: inline; } Thanks. It works

about 4 years ago · Juan Pablo Isaza Relatório
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