The following jQuery should traverse from a trigger inside the form, to the form parent, then find the input and set the value to the supplied data.
$(this).parent('form').find('input[name="testID"]').val(data);
example:
<html>
<head>
<script type="text/javascript" src="jquery.js"> </script>
<script type="text/javascript">
$(function(){
$("#trigger").click(
function(){
$(this).parent('form').find('input[name="testID"]').val('data');
});
});
</script>
</head>
<body>
<form>
<input type="text" value="" name='testID' />
<input type="button" value="Load AJAX" id="trigger" />
</form>
</body>
</html>