javascript elements is undefined
<p>When I load vote.php on my web browser instead of index.php, I was able to vote and display user statistic. However I decided to implement the poll system by adding include('vote.php') to index.php, my document.forms[0] from vote.js can detect how many radio buttons in vote.php but I having problem getting this code working that appear to be "undefined" or not able to response, I did not modify any code all time:</p>

<p>JS code:</p>

<pre><code>var objForm = objForm.elements['vote[' + pollId + ']'];
</code></pre>

<p>pollId is an integer type with value of '1' which is Poll question 1;</p>

<p>When I tried to trace using <code>objForm.elements</code>, it could show exact numbers of radio buttons I have implemented in HTML in the poll.</p>

<p>I need the solution to be "objForm.elements.vote[1]" before I could loop and detect which option did the user select.</p>
