Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

129
Vistas
How to fix the javascript execution error in blogger
<script>
var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
  this.classList.toggle("active");
  var content = this.nextElementSibling;
  if (content.style.maxHeight){
    content.style.maxHeight = null;
  } else {
    content.style.maxHeight = content.scrollHeight + "px";
  } 
});
}
</script>

When I am using this code in blogger this shows:-

"org.xml.sax.SAXParseException; lineNumber: 301; columnNumber: 16; The content of elements must consist of well-formed character data or markup. " Here is the image

Please help me how to fix this problem

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Even just looking at the syntax coloring that you provided in your image, the < is giving you problems in this line, line 301:

for (i = 0; i < coll.length; i++) {

The parser is interpreting < as the start of a tag, and expects a tag name and an end tag >. However, I'm guessing you are trying to use it as the JavaScript "less than" operator.

In that case, escape < as &lt;.

In otherwords, replace that line with:

for (i = 0; i &lt; coll.length; i++) {

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda