This site is to help you with your code and other related issues, not to give you THE code.
Search the same thing on google and write something on your own, if you face any trouble then post your code and we will help you out.
fun(){
document.getElementById('textboxId').value = "abc" //<your value here may be string>
}
and call this function where you want.
Or you can give your textbox name as similar to the variable you are using in your action class or using in the bean.