Hi,
I have a text control in my form. When I press a Enter key in this control , it should called another javascript function, but it is not doing so instead it is triggering "Submit" button event. Can you please help.
I have wrote a onkeypress function as follows:
<input type="text" id="txt1" style="width:30 0px" MaxLength="50" onkeypress="jav ascript:testEnt er()"/>
function testEnter() {
if(event.keyCod e==13){
anotherjavascri pt();
}
}
Thanks in advacne
Apurva G
I have a text control in my form. When I press a Enter key in this control , it should called another javascript function, but it is not doing so instead it is triggering "Submit" button event. Can you please help.
I have wrote a onkeypress function as follows:
<input type="text" id="txt1" style="width:30 0px" MaxLength="50" onkeypress="jav ascript:testEnt er()"/>
function testEnter() {
if(event.keyCod e==13){
anotherjavascri pt();
}
}
Thanks in advacne
Apurva G
Comment