Christ X

Christ X

  • NA
  • 33
  • 19.7k

Textbox issue with chrome and firefox. pls help me out

Aug 2 2013 7:07 AM
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)