What is wrong with this getElementsByClassName call in Javascript?
<p>I am trying to access the width of a div to put in a cookie. This is the div:</p>

<pre><code> &lt;div class="tab_panel" style="width:600px"&gt;
</code></pre>

<p>It is the only div with this class name. It is not an option to specify a unique id for the div. This is the code I have been using in an event to call it but it gives an error:</p>

<pre><code> document.getElementsByClassName(tab_panel).style.width
</code></pre>

<p>I know Firefox supports <code>getElementsByClassName</code>, so what am I doing wrong?</p>
