Z
zeltus
Hi
Can some kind soul(s) review my stripped-down html below and advise me
on why it doesn't work? All I get when I enter text in the form is the
ubiquitous "Error on page" at the bottom of the browser.
For the life of me, I can't see why it doesn't work :- it's gotta be
something simple, surely?
As ever, all help gratefully received
Cheers
Bill
---------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>counter</title>
<script language="JavaScript" type="text/javascript">
<!--
function CText(CField, CCount, Climit) {
if (CField.value.length > Climit) {
CField.value = CField.value.substring(0, Climit);
} else {
CCount.value = Climit - CField.value.length;
}
}
//-->
</script>
</head>
<body>
<form method="post" action="test.html">
<textarea rows="15" name="body" cols="75" wrap="physical"
onKeyDown="CText(this.form.body,this.form.total,100);"
onKeyUp="CText(this.form.body,this.form.total,100);"></textarea>
</form>
</body>
</html>
Can some kind soul(s) review my stripped-down html below and advise me
on why it doesn't work? All I get when I enter text in the form is the
ubiquitous "Error on page" at the bottom of the browser.
For the life of me, I can't see why it doesn't work :- it's gotta be
something simple, surely?
As ever, all help gratefully received
Cheers
Bill
---------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>counter</title>
<script language="JavaScript" type="text/javascript">
<!--
function CText(CField, CCount, Climit) {
if (CField.value.length > Climit) {
CField.value = CField.value.substring(0, Climit);
} else {
CCount.value = Climit - CField.value.length;
}
}
//-->
</script>
</head>
<body>
<form method="post" action="test.html">
<textarea rows="15" name="body" cols="75" wrap="physical"
onKeyDown="CText(this.form.body,this.form.total,100);"
onKeyUp="CText(this.form.body,this.form.total,100);"></textarea>
</form>
</body>
</html>