It's a very basic question which bugging me and nothing seems working. The page contain 2 forms (source-target) and I want to pass the value of one input(#query2
) to another (#query
) on blur event.
$(document).ready(function() {
$("#query2").blur(function(e){
//test 1
$('form[name=searchheadForm] #query').val($(this).val());
//test 2
$("form#search_head#query").val($(this).val());
});
});
Any idea? TIA.