when i try to store a .getElementById (), i notice it never stores it properly. for instance i could have this code..

Code:
b = document.getElementById('buttonName');
but when then i never get any results when i try to actually use b as an object, such as..

Code:
var x = b.offsetLeft;