title: HTML form input tag name element array with JavaScript
body: <p>This is a two part question.  Someone answered a similar question the other day (which also contained info about this type of array in PHP), but I cannot find it.</p>
  
  <p>1.) First off, what is the correct terminology for an array created on the end of the name element of an input tag in a form?</p>
  
  <pre><code>&lt;form&gt;
  
      &lt;input name="p_id[]" value="0"/&gt;
      &lt;input name="p_id[]" value="1"/&gt;
      &lt;input name="p_id[]" value="2"/&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>2.) How do I get the information from that array with JavaScript? Specifically, I am right now just wanting to count the elements of the array.  Here is what I did but it isn't working.</p>
  
  <pre><code>function form_check(){
      for(var i = 0; i &lt; count(document.form.p_id[]); i++){  //Error on this line
  
          if (document.form.p_name[i].value == ''){
              window.alert('Name Message');
              document.form.p_name[i].focus();
              break;
          }
  
          else{
              if (document.form.p_price[i].value == ''){
                  window.alert('Price Message');
                  document.form.p_price[i].focus();
                  break;
              }
  
              else{
                  update_confirmation();
              }
          }
      }
  }
  </code></pre>