/    Sign up×
Community /Pin to ProfileBookmark

Hi! There’s an error on saving comments with 1500 char value on my survey.. However, when saving comments with minimum char values such as 100-300 characters, it works so fine.. On my database, the comment was supposed to be stored on comments(column name) with Type of VARCHAR(2000).. And for limiting the value of text area, I have this code..

html:

<textarea name=”limitedtextarea” placeholder=”Type your comments here.” rows=”10″ cols=”50″ onKeyDown=”limitText(this.form.limitedtextarea,this.form.countdown,1500);” onKeyUp=”limitText(this.form.limitedtextarea,this.form.countdown,1500);”></textarea></span><br>
<font size=”1″>(Maximum characters: 1500)<br>
You have <input readonly type=”text” name=”countdown” size=”3″ value=”1500″> characters left.</font>

js:

<script language=”javascript” type=”text/javascript”>
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum – limitField.value.length;
}
}
</script>

What do you think is the problem?..

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @moonlightPyong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...