3.2.0

How to fire a JS event when "Enter" key is pressed ?

Hi,

I want to invoke a JS function when "Enter" key is pressed ?

Using the onkeydown or keypress event will be a way but how to track the "Enter" key ?
BhanuPratap Mohariya
February 5,
Use this code:-

<script language="javascript">
function keypress(e)
{
var Ucode=e.keyCode? e.keyCode : e.charCode
if (Ucode == 13)
{
//write the code for submit
AddChat(page);
}
}
</script>
***************************************
add this event on text box onkeypress="keypress(event);"

Regards
Vindesh Mohariya(Lowanshi)
mr.mohariya@gmail.com
Vindesh Mohariya(Lowanshi)
February 5,

This topic is archived.

See also:


Back to support forum