-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Won't get changed form values from textareas... #18
Comments
Well, I have a workaround, but it isn't pretty. By using jquery to force set the text (not val) of the textarea after entering text but before printing, the print code will now pick it up. |
Thanks, fixed! Please take a look and let me know if there are any issues still |
Thanks! |
actually, the new code doesn't work for me, I reverted back to my fix, which was essentially a separate function on the page that sets the values onblur:
|
Hmm, that's odd, because that is essentially what we're doing here, only right before we insert the selected content into an iframe for printing rather than on-blur: copy.find("textarea").each(function () {
// Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
var $field = $(this);
$field.text($field.val());
}); |
I don't understand either, it looks very similar. Let me go back through the code and see if anything sticks out... |
I don't understand why you closed the other bug in relation to this one, they seem quite separate issues to me. |
This added to the jQuery.print.js object will get the textareas cloned correctly.
|
Hi, I have included this code on my page and it will print what is on the page wonderfully, with one exception: I have a couple of textareas on the page that I need to put text into and have that print with the page, but the values will not get printed. Whatever values those textareas hold at page load (one of them has default values) WILL print, but if I make any changes to the content of those textareas, those will NOT print, only the original copy will. I have checked that manuallyCopyFormValues is set to true, but no luck. Any ideas?
The text was updated successfully, but these errors were encountered: