Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

282
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!