javascript - Jquery - copy excel data into input fields -


i trying copy excel columns 1 input field break each excel cell own input field. have working not excel data.

for example, if copy , paste '1 2 3 4 5' 1 input field, take each value , paste separate input field.

example: !http://imgur.com/1uzt1k1

if copy , paste data example below, not work:

!http://imgur.com/fwvaoua

check out jsfiddle example https://jsfiddle.net/jdarville/rfsn1sz4/

$("#templateinfo").bind("paste", function(e){             // access clipboard using api             var pasteddata = e.originalevent.clipboarddata.getdata('text');             arr = pasteddata.split(' ');             for(i=0; < arr.length; i++){                 $("#temp"+i).val(arr[i]);             }         } ); 

its splitting data ' ' , if copy , paste excel data has space between information not working.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -