In javascript I have a problem with a script I am writing. I need to be able to get the starting top and left positions of an html object like a table or an image that are defined in the CSS.
When I define the left(20px) and top(20px) offsets for the table I run the javascript console built into chrome and do parseInt(document.getElementById('component1').style.left) to see if it will give me the magnitude of the offset as a number. However, it returns NaN. I'm guessing because the browser isn't initializing these values(I thought setting it explicitly in the CSS, that the browser would)
Any ideas as to how I can get around this?