[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Markus

1/23/2003 4:48:00 PM

Does anyone know how to make a server control button the default button on
the page, so when the user hits Enter, the page will submit??

Thanks, Mark.


1 Answer

jn

1/23/2003 8:42:00 PM

0

This will call the click event when someon hits the enter
key.
"Save" is the name of the button


<script language="javascript">
document.onkeypress = handlerKP;
function handlerKP(e)
{
kp = event.keyCode
if (kp==13) document.Form1.Save.click();
}

</script>
>-----Original Message-----
>Does anyone know how to make a server control button the
default button on
>the page, so when the user hits Enter, the page will
submit??
>
>Thanks, Mark.
>
>
>.
>