Question: I have multiple text boxes which are created dynamically , these text boxes have the same name different id's. I need to get values of all those text boxes via ajax but did not have any clue, please suggest how can I achieve this.

**Edit**

I had tried 

```
$('#addMultipleEducationLevel').on('click', function () {
    $.ajax({
        url: "${createLink(controller: 'someController', action: 'someAction')}",
        data: {degreeId:$( "#degree" ).val(),fieldOfStudy:$('[name=fieldsOfStudy]').serialize()}
    });
})

```

But I am getting 

```
 [fieldOfStudy:fieldsOfStudy=&fieldsOfStudy=Biblical+Hebrew&fieldsOfStudy=Applied+Business+(Double+Award), degreeId:3, action:someAction, controller:somecontroller]

```

Answer: 
You can simply use an attribute selector and `serialize()` to gather the data to send:

```
var ajaxData= $('[name=name]').serialize();

$.post('/path/to/server', ajaxData, function(response){
   /* do something with response */
});

```

`**[DEMO](http://jsfiddle.net/BrfLZ/)**`
To get a textbox value, according to the fact that they have different IDs **try the following jQuery snippet:**

```
$("#ID OF YOUR CHECKBOX").val();

```

**Then if you want to send these values via AJAX, use this snippet:**

```
$.ajax({
    url: "receiver.php?value="+your_value_here+"&value2="+anpther_value_here,
}).done(function() {
    alert("data sent");
});

```