Jquery doesn't take the val()
<p>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. </p>

<p>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. </p>

<p>HTML:</p>

<pre><code>&lt;input type="text" value="" class="MyIn" id="MyIn" name="MyIn" &gt;
&lt;input type="hidden" value="&lt;?=$r['order_id'];?&gt;" class="orderid" id="orderid" &gt;
</code></pre>

<p>JavaScript:</p>

<pre><code>  $("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 + '&amp;sendNumber=' + sendNumber;

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

                }
            }
        });
    });
</code></pre>
