2
Answers

Textbox issue with chrome and firefox. pls help me out

Christ X

Christ X

11y
1.5k
1
i am giving some value in textbox1 (take for example vishal). so, when i give tab, it(vishal) should assign in textbox2. 
 
so, i used the following in aspx and java script:
 
aspx: 
 
onchange="getval()"
 

javascript
 
function getval() {
 
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
document.getElementById('<%=textbox2.ClientID %>').value = document.getElementById('<%=textbox1.ClientID %>').value;
}
 
It works correctly in chrome . but, not working in firefox. pls help me out.
Answers (2)