I'm trying to use Jquery to pass the value of one box that already has value defined to another that does not. I tried the code but I keep getting 'undefined' in the text box instead of the text.
<input type="text" ID="readonly" runat="server" class="threeline-two" readonly=
"readonly" value="[email protected]" />
<input type="text" ID="readonlytxt" runat="server" readonly = "readonly" />
<input type="text" ID="Year" runat="server" class="threeline-two" />
<input type="text" ID="Yeartxt" runat="server" />
<script type="text/javascript">
$(function () {
$('#Year').change(function () {
var TxtBox = document.getElementById("Yeartxt");
TxtBox.value = $(this).val();
var string = $(this).val()
var TxtBox2 = document.getElementById("readonlytxt");
TxtBox2.value = $("readonly").val();
var string = $("readonly").val()
});
});
</script>