event.keyvalue OnKeyDown

5 replies. Last post: October 7, 2010 12:29 AM by Niven Prasetya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Johnny LeyvaMember

how to get the event, such as whether the event is the tab key and depending on this to one or another action for example set focus another control.

 

I'm using this example, but does not work

 

<
ISWebCombo:WebCombo ID="wcPeriodo" runat="server" DataTextField="period" DataValueField="period" Height="20px" UseDefaultStyle="True" Width="86px"> <LayoutSettings AlwaysShowAllRowsOnDropdown="True" RoundCorner="True"> <ClientSideEvents OnKeyDown="Foco_Control('wcDocumento','web')" /> </LayoutSettings> </ISWebCombo:WebCombo>

 

--- function  javascript ----

function Foco_Control(control, tipo) {

if (event.keyCode==9)

{

 if (tipo == "aspx")

 {aspnetForm.ctl00_Contentplaceholder1_txtMontoNeto.focus();}

aspnetForm.ctl00_Contentplaceholder1_txtMontoNeto.focus();} else

 {  var objeto = ISGetObject(control);

 objeto.SetFocus(); }

}

 var objeto = ISGetObject(control);

 objeto.SetFocus(); }

}

 }

}

All times are GMT -5. The time now is 11:47 PM.
Previous Next