How to get the textbox value from a hidden field value assigned
<p>I have written the following script to get the value of hidden field to a text box when text box is empty on hitting tab but it did not works so can any one tell what's wrong in this</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function Tab() {
            var PayDate = document.getElementById('txtDate').value;
            var hdn1 = document.getElementById('hdn1');
            if (PayDate == null) {
                // Retreive the    next field in the tab sequence, and give it the focus. 
                document.getElementById('txtDate').value = hdn1.value;
            }
        }
    &lt;/script&gt;

&lt;asp:HiddenField ID="hdn1" runat="server" /&gt;
        &lt;asp:TextBox ID="txtDate" runat="server" onChange="Tab();"&gt;&lt;/asp:TextBox&gt;
        &lt;asp:Button ID="btn" runat="server" Text="Button" /&gt;
</code></pre>

<p>On my page load i write this</p>

<pre><code>if (!IsPostBack)
        {
            hdn1.Value = "1-2-2001";
        }
</code></pre>

<p>But i am not getting the value of hidden field assigned to text box when i am hitting tab can any one help me</p>
