Hey all, I'm using a form that looks something up online when submitted and displays the results in a DIV called 'results'. I'm trying to get that content to automatically populate a form field on the same page but just can't get it to work. This works but obviously repeats every second and clones into a DIV not a form field

HTML Code:
<div id="results"></div>
<div id="test"></div>

<script type="text/javascript">
window.setInterval(function(){
$('#results').clone().appendTo('#test');
}, 1000);
</script>
I guess I'm looking for something like this but its not working and not sure how I should go about cloning text to a form value

HTML Code:
<div id="results"></div>
<input name="test" id="test" type="text">

<script type="text/javascript">
$(document).ready(function() {
$('#results').delay(2000).clone().appendTo('#test');
});
</script>
Any help would be really appreciated. Thanks