I am trying to print a form (no server side involved) by copying the form using $(elem).html(). The problem is that the property values the user enters are not captured. I managed to get around this for input text areas and input check boxes using the answer supplied to my question how do I print a html form along with its contents but I have not been able to do the same for a textarea. Here's the code I used for the text and check box fields.
function CopyElem(elem)
{
$('form input[type=text]').each(function() {
$(this).attr('value', $(this).val());
});
$('form input[type=checkbox]').each(function() {
$(this).attr('checked', $(this).prop("checked"));
});
$('form textarea').each(function() {
});
}
So the question is what's needed for the textareas?