tags:

views:

11

answers:

1

hi,

 In my web application i am using obout Edit control. I want to restrict the user to type only 400 characters how can i restrict the user.i write javascript like this.
function textCounter(field,cntfield,maxlimit) { if (field.value.length > maxlimit) { alert("Cannot type more than 450 characters"); field.value = field.value.substring(0, maxlimit); } else { cntfield.value = maxlimit - field.value.length; } }

// this is text box

but it is giving error like no onkeydown for editor.

A: 

on the textbox there is a maxlength attribute that you can see

and that will only allow 400 characters to be entered

PaulStack
No PaulStack it is not textbox it is working fine on text box but it is not working on obout Edit control
Surya sasidhar