
More JavaScript Forms
Accept Terms | Agree Before Entry | All Lower Case | All Upper Case | Auto Currency | Auto Drop Down | Auto Month | Auto Tab | Auto Year List | Basic Validation | Block Key Press | Check Form | Check For Spaces | Checkbox Counter | Checkbox Text | Checkbox Changer | Add Commas | Copy Form Fields | Copy Name Field | Country Select List | Currency Format | Select A Day | Decimals Allowed | Disable Submit | Email Domain WHOIS | Basic Email Validation | Email Validation | Expanding Textbox | Extended Characters | Extract Email | Field Explanation | File Open | Form Focus | Form Swapper | Form Order Totals | Form Target Formatting | Format Input Case | Format Date | Preview HTML | Ignore Spaces | First Letter Uppercase | Items Popup List | Remember Items | Limit Textarea | Limit checkboxes | Textarea Line Wrap | List Chooser | List Organizer | Locked Textbox | Mail Pick Subject | Mailing List | Max Text Entry | Memory Cells | Money Filter | Multiple Mailer List | No Duplicates Entries | No Blank Entry | No HTML Entries | Only One Field | Customized Popup | Option Search | Pass Menu Frames | Pass Textbox Frames | Password Verification | Quantity Totals | Radio Totals | Convert Returns | Replace Characters | Required Fields | Search Box | Copy Selection Box | Selection Order | Select One | Select All | Sentence Caps | Smart Pulldown Menu | Dirty Words Filter | All Spaces To Plus | Strip Characters | Submit With Text Link | Submit Once | Submit Changer | Tab Key Emulation | Text Cycle | Text Reverse | Form Time Limit | Trim Leading Spaces | Trim Trailing Spaces | True Date Selected | Site Upload Filter | Removes Characters | Properly Filled | Valid Credit Card | Date Validated | External JS | Validate Guestbook | Verify IP address | Password Verify | Invalid submissions | Social Security Number | Verifies Valid Time | Invalid Zip Code | Validate Dates | Receive Feedback | Textarea Word Count | Word Character Count | Zip To State
Description
Let Javascript help you with this is a handy script that counts the words (or characters) entered into a textarea and limits it to 100 words or less (this can be changed)....View A Script Demo
Let Javascript help you with this is a handy script that counts the words (or characters) entered into a textarea and limits it to 100 words or less (this can be changed)....View A Script Demo
Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var submitcount=0;
function checkSubmit() {
if (submitcount == 0)
{
submitcount++;
document.Surv.submit();
}
}
function wordCounter(field, countfield, maxlimit) {
wordcounter=0;
for (x=0;x<field.value.length;x++) {
if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ") {wordcounter++} // Counts the spaces while ignoring double spaces, usually one in between each word.
if (wordcounter > 250) {field.value = field.value.substring(0, x);}
else {countfield.value = maxlimit - wordcounter;}
}
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
{field.value = field.value.substring(0, maxlimit);}
else
{countfield.value = maxlimit - field.value.length;}
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg>
<center>
<FORM NAME=Surv>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" width=550>
<tr><td valign="top">
<font color="000000" size="2" face="verdana, helvetica, arial">In 100 <b>words</b> or less, why do you (or would you) like living on the coast?</font><font color="ff0000" size="2" face="verdana, helvetica, arial">*</font>
<td valign="top"><textarea name="Q3367" cols="40" rows="5" wrap="hard" onKeyDown="wordCounter(this.form.Q3367,this.form.remLen,100);" onKeyUp="wordCounter(this.form.Q3367,this.form.remLen,100);"></textarea>
<br>Words remaining: <input type=box readonly name=remLen size=3 value=100></td></tr>
<tr><td colspan=2><hr width=80%></td></tr>
<tr><td valign="top">
<font color="000000" size="2" face="verdana, helvetica, arial">In 100 <b>characters</b> or less, why do you (or would you) like living on the coast?</font><font color="ff0000" size="2" face="verdana, helvetica, arial">*</font>
<td valign="top">
<textarea name="Q336" cols="40" rows="5" wrap="hard" onKeyDown="textCounter(this.form.Q336,this.form.remLentext,100);" onKeyUp="textCounter(this.form.Q336,this.form.remLentext,100);"></textarea>
<br>Characters remaining: <input type=box readonly name=remLentext size=3 value=100>
</td></tr>
</TABLE>
<INPUT TYPE="button" VALUE="Submit" onclick='' name=submit1>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1>
</FORM>
<P>
<FONT SIZE="-2" COLOR="ff0000" FACE="verdana, helvetica, arial">*</FONT><FONT SIZE="-2" COLOR="4169e1" FACE="verdana, helvetica, arial"> Indicates a required question.</FONT>
</center>
</BODY>
</HTML>
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var submitcount=0;
function checkSubmit() {
if (submitcount == 0)
{
submitcount++;
document.Surv.submit();
}
}
function wordCounter(field, countfield, maxlimit) {
wordcounter=0;
for (x=0;x<field.value.length;x++) {
if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ") {wordcounter++} // Counts the spaces while ignoring double spaces, usually one in between each word.
if (wordcounter > 250) {field.value = field.value.substring(0, x);}
else {countfield.value = maxlimit - wordcounter;}
}
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
{field.value = field.value.substring(0, maxlimit);}
else
{countfield.value = maxlimit - field.value.length;}
}
// End -->
</script>
</HEAD>
<BODY Background=../graphics/grayback.jpg>
<center>
<FORM NAME=Surv>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" width=550>
<tr><td valign="top">
<font color="000000" size="2" face="verdana, helvetica, arial">In 100 <b>words</b> or less, why do you (or would you) like living on the coast?</font><font color="ff0000" size="2" face="verdana, helvetica, arial">*</font>
<td valign="top"><textarea name="Q3367" cols="40" rows="5" wrap="hard" onKeyDown="wordCounter(this.form.Q3367,this.form.remLen,100);" onKeyUp="wordCounter(this.form.Q3367,this.form.remLen,100);"></textarea>
<br>Words remaining: <input type=box readonly name=remLen size=3 value=100></td></tr>
<tr><td colspan=2><hr width=80%></td></tr>
<tr><td valign="top">
<font color="000000" size="2" face="verdana, helvetica, arial">In 100 <b>characters</b> or less, why do you (or would you) like living on the coast?</font><font color="ff0000" size="2" face="verdana, helvetica, arial">*</font>
<td valign="top">
<textarea name="Q336" cols="40" rows="5" wrap="hard" onKeyDown="textCounter(this.form.Q336,this.form.remLentext,100);" onKeyUp="textCounter(this.form.Q336,this.form.remLentext,100);"></textarea>
<br>Characters remaining: <input type=box readonly name=remLentext size=3 value=100>
</td></tr>
</TABLE>
<INPUT TYPE="button" VALUE="Submit" onclick='' name=submit1>
<INPUT TYPE="reset" VALUE="Reset" id=reset1 name=reset1>
</FORM>
<P>
<FONT SIZE="-2" COLOR="ff0000" FACE="verdana, helvetica, arial">*</FONT><FONT SIZE="-2" COLOR="4169e1" FACE="verdana, helvetica, arial"> Indicates a required question.</FONT>
</center>
</BODY>
</HTML>
If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail

