I HEADER:
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: The JavaScript Source -->
<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site:
http://www.shiningstar.net -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!!
http://javascript.internet.com -->
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
<!-- Begin
function textCounter2(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>
I BODY:
<td align="left" bgcolor="#C0C0C0">
<h4>( Max 50 tegn )<br>
<textarea name=Betegnelse wrap=physical cols=50 rows=1 onKeyDown="textCounter(this.form.Betegnelse,this.form.remLen,50);" onKeyUp="textCounter(this.form.Betegnelse,this.form.remLen,50);"></textarea>
<input readonly type=text name=remLen size=2 maxlength=3 value="50" style="border: 0px solid #000000; background-color: #C0C0C0; font-weight:bold">tegn tilbage</font>
</h4>
</td>
</tr>
<tr>
<td width="80" valign="top" bgcolor="#C0C0C0">
<h4 style="margin-left: 5; margin-right: 0; margin-top:0; margin-bottom:0"><b>Problem:</b></h4>
</td>
<td bgcolor="#C0C0C0">
<h4>( Max 300 tegn )<br>
<textarea name=Problem wrap=physical cols=50 rows=5 onKeyDown="textCounter2(this.form.Betegnelse,this.form.remLen,50);" onKeyUp="textCounter2(this.form.Betegnelse,this.form.remLen,50);"></textarea>
<input readonly type=text name=remLen size=3 maxlength=3 value="300" style="font-weight: bold; border: 0px solid #000000; background-color: #C0C0C0">tegn
tilbage</h4>
Når jeg sætter textcounter 2 ind, vil ingen af tællerne virke