Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: RES: Re: Enter key same effect as the Tab


Message #1 by "Welliton Toledo (welliton@r... on Wed, 24 Jul 2002 12:18:30 -0300
Thank you, Jim {}

Welliton A. Toledo
welliton@r...
Desenvolvimento DataRey
(0xx62)546-2984


-----Mensagem original-----
De: jdonahue@f... [mailto:jdonahue@f...]
Enviada em: quarta-feira, 24 de julho de 2002 13:17
Para: aspx_beginners
Assunto: [aspx_beginners] Re: Enter key same effect as the Tab


You can use a client-side javascript to accomplish this:

function disableEnterKey(){
	if(event.keyCode == 13) 
	   event.keyCode=9 //return the tab key
    event.cancelBubble = true	    
}

then in your html, use the onkeydown="disableEnterKey" as follows:

<input id="whatever" type="text" onkeydown="disableEnterKey()">

Jim

> How I can do that the Enter key have the same effect as the Tab
key in a webform?

  Return to Index