[Javascript] How can i strict the length of TextAread form element ?

Peter Brunone peter at brunone.com
Fri Dec 21 22:11:59 CST 2001


<TEXTAREA onBlur="checkLength(this,500)"></TEXTAREA>


function onBlur(myBox,myLength) {
	if(myBox.value.length > myLength) {
		alert("The size limit is " + myLength + "characters;\n you have entered "
+ myBox.value.length);
		myBox.focus();
		}
	}

Cheers,

Peter

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of M. Amin
|Sent: Friday, December 21, 2001 5:31 PM
|To: java-script
|Cc: WDVL
|Subject: [Javascript] How can i strict the length of TextAread form
|element ?
|
|
|Dear All,
|  I tried to strict the length of TextAread form element  using the
|maxlength attribute but
|it did n't work. So, How can i strict the length of TextAread form
|element ?
|
|Any help will be appreciated,
|
|Regards,
| M. Amin
|
|_______________________________________________
|Javascript mailing list
|Javascript at LaTech.edu
|https://lists.LaTech.edu/mailman/listinfo/javascript
|




More information about the Javascript mailing list