Javascript: Syntax error when using document.getElementById
<p>I'm trying to create a dynamic bar chart with divs that changes depending upon data loaded from a JSON file.</p>

<p>However, I cannot seem to modify any divs through javascript. The following code results in an error in Chrome:</p>

<pre><code>document.getElementById("div123").style.width = 500px;
</code></pre>

<p>The DIV in question is defined in CSS above the javascript and has id="div123".</p>

<p>What am I doing wrong? How can I change divs dynamically in a lightweight way, without using a library?</p>
