I am trying to get the width of my content box with the following comand:
var box = document.getElementById('player');
var boxSize = box.clientWidth;
It seems to return something. When I alert it it gives out a number. But it still throws the error:
Uncaught TypeError: Cannot read property 'clientWidth' of null
What is happening here?