Try this:
<html>
<head>
<title>My Page</title>
<script language="JavaScript">
function textCounter(field, countfield, maxlimit)
{
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
function openWin( windowURL, windowName, windowFeatures )
{
return window.open( windowURL, windowName, windowFeatures ) ;
}
</script>
</head>
<body>
<form name="myform">
<p><input disabled type=text name=remLen size=3 maxlength=3 value="60">
characters left.
<p>My text field:<br>
<textarea name="Introduction" cols="30" rows="3" wrap="virtual"
onKeyDown="textCounter(this.form.Introduction,this.form.remLen,60);"
onKeyUp="textCounter(this.form.Introduction,this.form.remLen,60);">
</textarea>
</p>
</form>
</body>
</html>
Cheers!
Peter Tilbrook
Chief Web Developer
Lunar Power Internet Technologies
Unit 1, 26-28 Winchcombe Court
Mitchell, ACT, 2911
AUSTRALIA
Phone: +61 2 6242 6666
Fax: +61 2 6242 6655
WWW: http://www.lunarpower.com.au
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists