Original Post
I'm not sure whether this is in the right forum or not but here goes anyway. Say I've got a form setup like the following:
<form action="index.php" name="list" method="post">
<input type="text" name="txt[]" value="" />
<input type="submit" name="submit" value="Submit" />
</form> And I've got a piece of javascript to add another input box each time a button is clicked (it's actually set up with divs and stuff but for simplicity's sake I'll just refer to the above one). The javascript needs to be able to select the value of one of those input boxes. In firefox the following gives a syntax error: document.list.txt[].value (which is understandable) but this apparently has no value: document.list.txt[0].value. When I change the value of the input box so that it isn't empty I get the same results. There is a workaround involving names like txt_1 and looping through them. But I'd rather not do that because it creates extra code on the javascript as well as the PHP side. I just want to know if there is a way of getting the value of an array of input boxes. Any help would be welcome. Thanks, Fyorl