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

577
Vistas
Uncaught TypeError: Cannot read property 'scrollHeight' of null

There are a few conversation about this topic, but no one that really can help me.

Here is a page I am modifying, using Wordpress: http://www.cargo-websites.eu/demo-1/voorraad/

For a Javascript integration I am adding a script tag in the <head> tag of header.php:

<script type="text/javascript" src="http://voorraad.cargo-websites.eu/demo-1/voorraad/js/include.js"></script>

As soon as I add this code, the page returns the following errors:

Uncaught TypeError: Cannot read property 'scrollHeight' of null
at responseIt (include.js:5)
at window.onresize (include.js:4)
at Object.trigger (jquery.js:3)
at Object.a.event.trigger (jquery-migrate.min.js:2)
at jquery.js:3
at Function.each (jquery.js:2)
at a.fn.init.each (jquery.js:2)
at a.fn.init.trigger (jquery.js:3)
at theme.js:78
at theme.js:94

include.js:5 Uncaught TypeError: Cannot read property 'scrollHeight' of null
at responseIt (include.js:5)
at window.onresize (include.js:4)

And consequently, the header-img on that page has disappeared.

I found a"how to" for fixing the problem but it's far beyond my knowledge. How can I solve this issue?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Looking at that line (5) of include.js, we see it begins with this code:

var height=d.getElementById('pageContent').scrollHeight;

That code attempts to access the scrollHeight property of whatever is returned by d.getElementById('pageContent'); (note that in line 4 - the start of the function responseIt(), d is assigned the value frame.contentWindow, where frame is assigned the value returned by document.getElementById('voorraadFrame') i.e. the DOM of the iframe with id="voorraadFrame").

In your browser console, you should be able to add a breakpoint on line 5 and reload to inspect the value being returned (see image below where I did it in Google Chrome).

chrome debugger

In order for that to return a DOM element, the HTML of the page needs to contain an element like this:

<div id="pageContent"></div>

The tag name could vary (e.g. could be p, span, etc.).

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