Try this var values=$('input[name="item[]"]').map(function() { return $(this).val() } ).get();
Thanks Rupak On Fri, Sep 11, 2009 at 3:04 PM, ximo wallas <igguan...@yahoo.com> wrote: > Hello! > I have a form with some fields like this: > > <input type="text" name="item[]" id="item[1]" /> > <input type="text" name="item[]" id="item[2]" /> > <input type="text" name="item[]" id="item[3]" /> > <input type="text" name="item[]" id="item[4]" /> > > How can I retriev the values with jquery? > > I'm using this: > *************************** > item = new Array(); > for(var n = 0 ; n < items_amount ; n++) > { > item = $("#item[n]").val(); > } > ****************************** > Where n is a number that comes from a bucle FOR, cuase I also know how many > elements come in the array... > I allways get undefined when I try to see item[] value. > > > >