Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

The "LEN" function

Posted 21 Jun 2002 21:48:18
1
has voted
21 Jun 2002 21:48:18 David Thomas posted:
hi all,
I am trying to add a textbox into a form that utilises the built in "LEN" function that will return a number of characters typed into another textbox.

For instance if adding a signature in a forum application, and it can only have max200 characters, but rather than just setting the maxValue of the textfield, actually have a seperate box, showing a count as i type.

"Nobody ever said this stuff was easy"

Replies

Replied 21 Jun 2002 23:47:58
21 Jun 2002 23:47:58 Owen Eastwick replied:
Creat the function:

function ShowCharacters(){
document.FormName.txtDisplayLength.value = document.FormName.txtTypeHere.value.length
}

Then in the page

</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="FormName" method="post" action="">
<textarea name="txtTypeHere" onKeyUp="ShowCharacters()"></textarea>
<br>
<input type="text" name="txtDisplayLength">
</form>
</body>
</html>

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 22 Jun 2002 00:17:57
22 Jun 2002 00:17:57 David Thomas replied:
Thanx a million Owen <img src=../images/dmxzone/forum/icon_smile_approve.gif border=0 align=middle>

"Nobody ever said this stuff was easy"

Reply to this topic