Here is the situation, I have one input box and one text area on a same page. If user pastes some value in the input box, the value should be pasted in the text area instead, nothing should show in the input box but focus should remain in input box.
Here I have implemented this. The problem is, it works in chrome not in IE or Mozilla. Can anyone tell me what I am doing wrong? How can I make it work cross browser?
Edit: Thanks all, for the solution. But the problem I am facing with the new ideas you guys have provided that the format of the text goes way. For example, If I Copy multiple rows of data from Excel and paste, it converts in a single line data. That’s obvious as in the modified code here, we are actually copying the value of input box in the text area and in the input box all the formatting goes away. The solution initially I had was working perfectly with the chrome, not in IE/Mozilla. But, the new solution works half way through for all the browsers. How can I keep the format of the pasted text also?
Try this : http://jsfiddle.net/4nejh/13/
A bit of a delay, but if you adjust the timeout it should work smoothly