PDA

Click to See Complete Forum and Search --> : textbox....or


rammy
Mar 8th, 2001, 11:56 PM
Is is possible to have a multiline textbox in HTML??

I need to allow users to enter upto 250 characters. I dont want to use the normal textbox....and using a textarea won't allow me to restrict the no. of characters entered.

Thanx.

Mark Sreeves
Mar 14th, 2001, 07:27 AM
is this any good?


<HTML>
<HEAD>
<script language="JavaScript">
function x()
{
var str = document.frm1.TEXTAREA1.value
if(str.length > 250)
{
document.frm1.TEXTAREA1.value=str.substring(0,250)
}
}

</script>
</HEAD>
<BODY>
<form name=frm1>
<TEXTAREA name=TEXTAREA1 onKeyUp="x()">
</TEXTAREA>
</form>
</BODY>
</HTML>

rammy
Mar 14th, 2001, 10:21 PM
it is Mark :), Thanx