I have the following code snippet which is invoked when edit button in grid is clicked a window pops up

```
edit: function(e) {
$('input[name="prods"]').each(function()
{
    var textarea = $(document.createElement('textarea'));
    textarea.text($(this).val());

    $(this).after(textarea).remove();
}); 
}

```

A text box input type is converted to textarea which works fine.

Once it is converted to textarea, how do I assign the value of textarea to `$('input[name="prods"]')` 
when save button is clicked of popup window?