Hi
Basically I've got textboxes called dimension[0][scale], dimension[0]width etc.
How do i pass the the elements 'dimension' as an array? I've tried $('input[name=dimension]').serialize()
and doesnt seem to work.
Hi
Basically I've got textboxes called dimension[0][scale], dimension[0]width etc.
How do i pass the the elements 'dimension' as an array? I've tried $('input[name=dimension]').serialize()
and doesnt seem to work.
Is this wat you want to do:
var dimArr = $.makeArray($("input[name^='dimension']"));
for(var i = 0; i < dimArr.length; i++) {
//this displays name of checkbox elements stored as array
alert(dimArr[i].name);
}
If you're trying to serialize data for an AJAX request in jQuery, just serialize the entire form:
var formData = $('#RateAddForm').serialize();