highspider
April 8th, 2011, 11:30 PM
On Firefox and IExplorer it works perfect; however, Google chrome it limits to 20 chars instead of 800. And I have no Idea why.
RED - Related to code
<html><body>
<script type="text/javascript">
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // too-long aka copy-paste trim it
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}
</script>
<form name="emailform" id="form_id" method="post" action="cgi-bin/email.pl">
<table>
<tr><td colspan="2"><label for="MSG">
<textarea maxlength='20' rows="20" cols="55" id="MSG" name="MSG"
onKeyDown="textCounter(document.emailform.MSG,document.emailf orm.remLen1,800)"
onKeyUp="textCounter(document.emailform.MSG,document.emailf orm.remLen1,800)">
</textarea>
You have
<input readonly type="text" name="remLen1" size="3" maxlength="3" value="800">
remaining characters. </td></tr>
<tr><td align="center" colspan="2"><input type="submit" value="Submit Message" />
</table></body>
</html>What it does its limit to 800 chars for the message so people don't get diarrhea of mouth filling up email messages.
I'm not the original author I just edited it for my use ~Found on net by: ?~
NOTE: is part of a giant web page but error is still present in the condensed version.
RED - Related to code
<html><body>
<script type="text/javascript">
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // too-long aka copy-paste trim it
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}
</script>
<form name="emailform" id="form_id" method="post" action="cgi-bin/email.pl">
<table>
<tr><td colspan="2"><label for="MSG">
<textarea maxlength='20' rows="20" cols="55" id="MSG" name="MSG"
onKeyDown="textCounter(document.emailform.MSG,document.emailf orm.remLen1,800)"
onKeyUp="textCounter(document.emailform.MSG,document.emailf orm.remLen1,800)">
</textarea>
You have
<input readonly type="text" name="remLen1" size="3" maxlength="3" value="800">
remaining characters. </td></tr>
<tr><td align="center" colspan="2"><input type="submit" value="Submit Message" />
</table></body>
</html>What it does its limit to 800 chars for the message so people don't get diarrhea of mouth filling up email messages.
I'm not the original author I just edited it for my use ~Found on net by: ?~
NOTE: is part of a giant web page but error is still present in the condensed version.