Newbie,
I'm a little rusty on my Javascript. =)
For each of these, you will want to attach an event handler for the
textbox so that when it changes, your method is fired (look for an onChange
event). Then, in the event handler, you can modify the contents of the
other textbox, or get the length of the current text and set a label to that
number to show how many characters are typed.
Also, for textboxes, I believe you can set the length attribute in the
input tag to indicate the maximum length of the contents of the textbox.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Newbie" <Ne****@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
i need to use javascript in the following 2 situations but dont know how
and
thanks in advance:
1. i have 2 textboxes and they usually contain the same information. when
the user starts entering data in the 1st textbox, the data should also
appear
in the 2nd textbox. if needed, the user can modify the data in the 2nd
textbox.
2. i have a textbox and a control beside it. the textbox should have a
max.
no. of char. allowed and the control beside it reminds the user how many
more
chars. can be entered. as the user enters characters, the control starts
counting down. an example of this is Carfax's textbox for entering the VIN
#.