pls help me? how to make focus to next control when enter key press in that controll
I have 3 textbox When I Press Enter key In Textbox1 The Focus to should be 2 textbox and iF 2texbox enter Foucs on 3 Textbox
My Problem is
Name_txt.Attributes.Add("onkeypress", "if(event.keyCode==13)document.forms[0].Address_txt.focus()")
When I enter key is Press in Name_txt The Page load is Working and I have Button for save Its Also Working
Pls help me with code
It's not clear exactly what you're asking. The following example moves the focus. If this doesn't resolve your issue, you should follow up in the IE newsgroups.
IE/DOM related questions
http://www.microsoft.com/windows/ie/support/newsgroups/default.mspx
Click on the newsgroup with the particular version of IE you're interested in.
<script>
function nextControl(event, nextControl) {
if (event.keyCode == 13)
nextControl.focus();
}
</script>
<input type=text name=text1 onkeypress="nextControl(event, text2)">
<input type=text name=text2 onkeypress="nextControl(event, text3)">
<input type=text name=text3 onkeypress="nextControl(event, text1)">