Question: I have a little problem with the jQuery - In jquery ui confirm dialog i have 2 inputs:
first - hidden with precise value=""
second - input text - and here is the problem. 

When I click "ok" the script sending me only first value, second is empty. But when I write the value="123" there two are sending. 

HTML:

```
<input type="text" value="" class="MyIn" id="MyIn" name="MyIn" >
<input type="hidden" value="<?=$r['order_id'];?>" class="orderid" id="orderid" >

```

JavaScript:

```
  $("a.opener").click(function (e) {
        $("#dialog-message").dialog({

            buttons: {
                Ok: function () {
                    var sendNumber = $("input#MyIn").val();
                    var orderid = $("input#orderid").val();

                    var dataString = 'orderid=' + orderid + '&sendNumber=' + sendNumber;

                    $.ajax({
                        type: "POST",
                        url: "moduls/send.php",
                        data: dataString,
                        success: function () {
                            $("#dialog-message").dialog("close");
                        }
                    });
                    return false;

                }
            }
        });
    });

```

Answer: 
It probably won't make much difference but it can be good practice, when sending data through AJAX, to include a DATATYPE, like this:

```
$.ajax({
  type: "POST",
  url: "moduls/send.php",
  data: dataString,
  dataType: 'text',
  success: function () {
    $("#dialog-message").dialog("close");
  }
});

```
Your current jQuery code should be working as the refence of the hidden input element's value is valid.

Demo: <http://jsfiddle.net/3qpV4/>

Try alerting the value to ensure it is being set properly. If it isn't, then you know that the problem is in your PHP variable expansion. If it does alert, then the issue is with your PHP file `send.php`.