javascript - Bug in autosize.js of textareas when loading value from PHP -
i trying create web-form has alternative reload saved data.
the problem when big string of text entered autosized textarea has been saved , reloaded adds big amount of white space text area. [see before save, , after load pictures below]
before save: after load:the form info loaded php injection of value in next example:
<textarea class='animated' name="coursetitle" id="coursetitle"><?php echo ($_post['coursetitle']) ?></textarea>
the form can seen in link. http://pansycheung.com/forms/newcourseproposal.php?c2ef=0
and info can loaded form in table below (found @ bottom of form page).
load table:select first file load
"phillip test eecs3603"
the white space disappears when doing 1 of following.
type test area or adjusting zoom in browserany help debugging suggestions fantastic.
go ttp://pansycheung.com/forms/newcourseproposal.php?c2ef=0 test form.
thank you!!!
using jquery, did seek 'triggering' autosize?
$('#coursetitle').trigger('autosize.resize');
you have initialize autosize;
$('#coursetitle').autosize();
if still doesn't work seek putting 'trigger' autosize in settimeout();
settimeout(function(){ $('#coursetitle').trigger('autosize.resize'); }, 1000);
javascript php html whitespace autosize
No comments:
Post a Comment