Javascript onclick not firing
<p>I have a really simple javascript function to return the index of a selected  field, it looks like this:</p>

<pre><code>function validateForm()
{ 
    alert(document.getElementByID('textfieldAmount').selectedIndex);
            return false;
    }
</code></pre>

<p>This is called from an input button onClick like this:</p>

<pre><code>onclick="return validateForm();" 
</code></pre>

<p>but the Javascript is never called and the page is submitted anyway.</p>

<p>If i change the alert to alert("wibble"); the alert works fine and the page is not submitted.</p>

<p>The element i am querying looks like this:</p>

<pre><code>&lt;select name="textfieldAmount" id="textfieldAmount" class="form"&gt;
</code></pre>

<p>Any ideas why its not working before i kill myself?</p>
