How do I pull elements out of an array and put it in a text field in javascript
<p>This is just an exercise I'm trying to complete. I was thinking in terms of creating an order form in the most basic way. I have a basic array with a list of guitars. I would have a user put a number in the first field and that number would reference an index in a array to put the array element in another text box. This is what I have at this point-</p>

<pre><code>var gbrand = ('Jackson', 'BC Rich', 'Gibson', 'Fender', 'Dean', 'ESP', 'Fernandez');

function ordernum(gbrand)
{

    var order = document.order.perchnumb.value 

    if ( order != '' )
    {

      order = gbrand[index];
      document.order.instrum.value = order;

    }
}   
</code></pre>
