Javascript array join() and getelementbyid error
<p>I'm new to javaScript and i'm having quite some troubles with it.. The general idea behind this program is that the user enters some values in the 6 text boxes and after submitting, those are shown concatecated in the text result box. But so far no value comes in the text box and I dont know what the error is... Could anyone please point me in the right direction? </p>

<pre><code>&lt;html&gt;

&lt;head&gt;
    &lt;script type="text/javascript"&gt;
        function concatetext(array)
        {
            var n = new Array[];
            for (var i=0; i&lt;f['array[]'].length; ++i)
            {
                n[x] = document.forms["form1"].elements["array" + x].value;
            }
            document.getElementById('textresult').innerHTML = n.join();
        }
    &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

    &lt;form id="form1" onsubmit="concatetext(text)"&gt;
        text 1:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        text 2:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        text 3:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        text 4:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        text 5:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        text 6:&lt;input type="textbox" name="text[]" size="16 px" /&gt;
        &lt;br /&gt;
        &lt;input type="submit" value="Submit" name="submit"  /&gt;
        &lt;br /&gt;&lt;br /&gt;
        text Result:&lt;input type="textbox" id="textresult" size="35 px" /&gt;
        &lt;br /&gt;

    &lt;/form&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
