Jquery: Pass text box value to hidden field

I have a calender date selector on my page, when the user selects a date I want to transfer the date to a hidden field onBlur. Can someone please help me out?

Here is the jquery i have so far:


<script type="text/javascript">
// set rates codes for Booking Method = GroupRes Confirmation
$(function(){
	$('#chk_in').blur(function() {
  		$('input[name=cheese]').($('#chk_in').val());
		
	});
});
</script>

here are my form fields:


<input name="chk_in" type="text" class="inputext" value=""  style="cursor: text" id="chk_in" />
<input name="cheese" type="hidden" class="inputext" value=""  style="cursor: text" id="cheese" />

You almost got it, one thing to note is when passing values around forms you need to use the val() method for every field you want to get or set a value on

$('input[name=cheese]').val($('#chk_in').val());

Awesome, thanks!

No problem