View Single Post
Old 11-26-2012, 05:35 AM   PM User | #3
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
corrections: http://jsfiddle.net/hc8kL/29/


Code:
function getuserdata(){
    setTimeout(function() {
var $ta= $("#textareaid");
var $data= $ta.val().split('\n');
var $first = $data[0].replace('First Name',"");
var $last = $data[1].replace('Last Name',"");
var $post = $data[2].replace('Postcode',"");
$('#f1').val($.trim($first));
$('#f2').val($.trim($last));
$('#f3').val($.trim($post));
        $ta.val('')
       }, 150);
}
$(document).ready(function(){
$("#autofillid").parent().click(function(e){
    e.preventDefault();
getuserdata();
});
$("#textareaid").live('paste',function(){
    getuserdata();
});
});
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote