Hi I have a form that data post something weird...

HTML:

```
<form>
   <input type="radio" name="datatype" value="1"/> <label>Datatype 1</label>
   <input type="radio" name="datatype" value="2"/> <label>Datatype 2</label>
   <button type="submit">Submit</button>
</form>

```

FORM 1:

```
$('form').submit(function(){
    var dt = $(this).serializeArray();
    $.ajax({
        url: 'post.php',
        data: dt,
        ..................
    })
})

```

FORM 2:

```
  $('form').submit(function(){
    var opt = $(['input[name=datatype]').val();
    var dt = [{name:'dtype',value: opt }];

    $.ajax({
        url: 'post.php',
        data: dt,
        ..................
    })
})

```

In FORM 1 datatype properly post with the correct value either 1 or 2. In this part I am using serialize array. Now the weird thing is on FORM 2 if you choose datatype 2 it always post the value of 1. I need to use FORM 2 for some reason... Am glad if anyone could help. Thanks