values from table to text box

values from table to text box

in this line data is like this 23 4 abc .. i combine 3 columns data in 1 column before combine data was  
value 1=23 value2=4 value3=abc after combine this comes in singlie td 23 4 abc now i try to 
 to get these separated values in label how i do this  i got type in text box when i select row now i want to get info values in these 3 texbox ..   value1_txt  = 23,  value2_txt =4  value3_txt =abc

  1. <script type="text/javascript">

            $(function () {

                debugger;

                $('#table1').on('click', 'tr', function () {

                    debugger;

                    if ($(this).hasClass('selected')) {

                        $(this).removeClass('selected');

                    }

                    else {

                        $('#table1', 'tr.selected').removeClass('selected');

                        $(this).addClass('selected');

                    }

     

                    var row = $(this);

                    debugger;

                    var Type = row.find('td')[0].firstChild.data;

                    var info = row.find('td')[1].firstChild.data;

                    var s = {};

                    s. =Type;

                    s.info =info;

                    alert(JSON.stringify(s));

     

                });

              $('[ID*=btnadd]').on('click', function () {

                  var Type = $("#table1 tr.selected").find('td:eq(0)').html();

                  var info = $("#table1 tr.selected").find('td:eq(1)').html();

                                s = {};

                                s. Type = Type;

                               s. info = info;

                                alert(JSON.stringify(s));

                                get(s);

     

                            });

            });

     

            debugger;

            function get(s) {

                    var ins = {};

                    ins. Type = s.Type;

                    ins. info = s.info;

                    $.ajax({

                        type: "POST",

                        url: "M.aspx/insert",

                        contentType: "application/json;charset=utf-8",

                        data:JSON.stringify(ins),

                        dataType: "json",

                        success: function (result) {

                            var insertd = JSON.parse(result.d).response;

                            debugger;

                            $('[ID*=btnadd]').on('click', function () {

     

     

                                $("#type_txt").val(ins.Type);

                                $("#value1_txt").val();

     

                                $("#value2_txt ").val();

     

                                $("#value3_txt ").val();

     

     

                            });

     

                        },

                        error:function(error)

                        {

                            var r = error.responseText;

                            var errorMessage = r.Message;

                             alert(errorMessage);

                            alert(r);

                            alert("error");

     

                        }

     

                    });

                };

          

           

        </script>