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

294
Visualizações
jQuery Html load stripping <form> tag

I am loading partial view through ajax call html(). I can see response has <form> tag in chrome javascript debug. But when it loads to source it is disappearing. I can rest of the html except tag.

I am loading under another tag. I don't know what is the issue here?

var HandleGetEditPhone = function (response) {

if (response !== "") {
    $('#DivPhoneContainer').html(response);
}

}

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You should check if you are nesting form elements, since chrome removes nested form tags.

related to your question:

Chrome removes form element when using jQuery ajax

How do you overcome the html form nesting limitation?

over 4 years ago · Santiago Trujillo Relatório

0

I faced the same issue. The following snippet worked for me.

var HandleGetEditPhone = function (response) {
    if (response !== "") {
        $('#DivPhoneContainer').empty();
        $('#DivPhoneContainer').html($(response));
    }
}

Do let know if it solves your issue.

over 4 years ago · Santiago Trujillo 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