VBscript,Plzz help

Hello,
I have a textarea html tag inside a page, and I want that every time that the user press the enter key inside a textarea an event will be fired. How can I detect that the enter key is pressed ? I know that the onkeypress event is fired everytime that the user press any key, but I want to identify only the enter key to execute a specific action.

Currently i m using:

myText = Replace(myTxt,vbCrLf,"<br>")
myText=replace(myTxt," "," ")

When i sent mail with this matter , it doesnt show sentense on new line
plzzz help.
Thanks
[617 byte] By [shewale.rohini] at [2007-11-19 21:51:08]
# 1 Re: VBscript,Plzz help
Well, I don't think that you can fire a VBScript every time you press the return key but you can do it with JavaScript.

<script language="JavaScript">
checkkey(e){
if(e.keyCode == 13){
alert("You pressed the return key!");
}
}
</script>

<input type="text" onkeypress="checkkey(event)">
PeejAvery at 2007-11-8 0:22:48 >