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

247
Views
TypeError no capturado: no se pueden leer las propiedades de nulo (leyendo 'contenido')

Necesito su ayuda para solucionar este error, apareció de la nada, estaba funcionando normalmente y ahora no sé por qué me sale este error con el X-CSRF-TOKEN. Mi cabeza:

 <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge">

Mi guion:

 <script> const csrfToken = document.head.querySelector('meta[name="csrf-token"]').content; document.getElementById('_categoria').addEventListener('change',(e)=>{ fetch('subcategorias',{ method : 'POST', body: JSON.stringify({texto : e.target.value}), headers:{ 'Content-Type': 'application/json', "X-CSRF-Token": csrfToken } }).then(response =>{ return response.json() }).then( data =>{ var opciones ="<option value=''>Elegir</option>"; for (let i in data.lista) { opciones+= '<option value="'+data.lista[i].id+'">'+data.lista[i].nombre+'</option>'; } document.getElementById("_subcategoria").innerHTML = opciones; }).catch(error =>console.error(error)); }) document.getElementById('_subcategoria').addEventListener('change',(e)=>{ fetch('empresas',{ method : 'POST', body: JSON.stringify({texto : e.target.value}), headers:{ 'Content-Type': 'application/json', "X-CSRF-Token": csrfToken } }).then(response =>{ return response.json() }).then( data =>{ var opciones ="<option value=''>Elegir</option>"; for (let i in data.lista) { opciones+= '<option value="'+data.lista[i].id+'">'+data.lista[i].nombre+'</option>'; } document.getElementById("_empresa").innerHTML = opciones; }).catch(error =>console.error(error)); })

Aclaro que el script es para selecciones dinámicas de 3 niveles.

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