G
GP
On the keydown event of a webcontrol in asp.net,I want to display the total
number of characters typed in another text box,how do I do it?
I have a text box web control,I want to check the length of the character on
the key down event of the textbox control which is a client side validation.I
am able to trap the keydown event the control displays an alert message "Key
down fired".
I am passing the control itself as parameter like
onkeydown="chkMaxLength(this)")
In the java script function
function chkMaxLength(input)
{
var element;
element=document.getElementById(input.name);
alert(element.Value);
}
It always gives the error at document.getElementById(input.name),can some
one help how to retreive the length and display it in another text box
control.
Thanks
GP
number of characters typed in another text box,how do I do it?
I have a text box web control,I want to check the length of the character on
the key down event of the textbox control which is a client side validation.I
am able to trap the keydown event the control displays an alert message "Key
down fired".
I am passing the control itself as parameter like
onkeydown="chkMaxLength(this)")
In the java script function
function chkMaxLength(input)
{
var element;
element=document.getElementById(input.name);
alert(element.Value);
}
It always gives the error at document.getElementById(input.name),can some
one help how to retreive the length and display it in another text box
control.
Thanks
GP