javascript keyboard

I have a keyboard in javascript, want to active it so that it can give input to the textarea or text field by pointing to the character on the screen.

I can do it if the is only one textarea in teh form and in the same file. What should I do if I want to give input in more than one textare or textfield, and the form is in diffrent file..Please help me.. thank you