I hav a web form that has a webnumericedit and some webimagebuttons. when I get to the last button (close) and hit tab, focus is sent to the URL box. I want it to go back to the webnumericedit. All of my code sites in the body section and my page does have a master page.
Does anyone have a code snippet? I have been trying the on blur without sucsess. Here is some of the code:
Regards,
Willie
<table id="Table1" width="100%" runat="server"> <tr id="Tr4" runat="server"> <td id="Td9" runat="server"> <igtxt:WebNumericEdit ID="p_served" runat="server" DataMode="Long" ValueText="0" Nullable="False" TabIndex="2"> </igtxt:WebNumericEdit> </td> </tr> <tr id="Tr5" runat="server"> <td id="Td22" runat="server"> <igtxt:WebImageButton ID="pbCancelButton" runat="server" Text="Close" OnClick="pbCancelButton_Click" CausesValidation="False" TabIndex="9" > <ClientSideEvents Blur="pbCancelButton_Blur" /> </igtxt:WebImageButton> </td> </tr></table>
<script language="javascript" type="text/javascript">function pbCancelButton_Blur(oButton, oEvent) { //Add code to handle your event here. //document.form1['p_served'].focus(); //this.form.elements['p_served'].focus(); //document.all('p_served').focus(); //alert("in blur"/*this.form.elements['p_served'].ID*/); var tb = igedit_getById("p_served"); var ps = document.getElementById("p_served"); tb.focus(); /* if (tb != null) { tb.focus(); } else { alert("tb is null. p_served not found"); } */ }</script>
Hello williem,
Thank you for posting this question in our community. I would recommend you to handle the KeyDown event and to put your logic in there like this:
<igtxt:WebImageButton ID="WebImageButton1" runat="server" Text="Test" TabIndex="9"> <ClientSideEvents KeyDown="WebImageButton1_KeyDown"/> </igtxt:WebImageButton>
<igtxt:WebImageButton ID="WebImageButton1" runat="server" Text="Test" TabIndex="9">
<ClientSideEvents KeyDown="WebImageButton1_KeyDown"/>
</igtxt:WebImageButton>
function WebImageButton1_KeyDown(oButton, oEvent){ //Add code to handle your event here. }
function WebImageButton1_KeyDown(oButton, oEvent){
//Add code to handle your event here.
}
I hope this information is helpful, for any further questions do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support