function myClickHandler{ window.document.myForm.myTextArea.handleEvent; } function changeText(){ document.myForm.myTextArea.value = counter++; } --> </script> </head> <body> <form name="myForm"> <textarea name="myTextArea" rows=6 cols=50 onClick='changeText()'> Here is some text in my text area. </textarea> </form> </body> </html>