| |
You are here: Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > data binding within textbox
Expert: robert mamayev - 9/16/2009
Question Hello sir,
I am designing a Library management System. I want a help from you. If a user id is entered into a textbox, username of that user id should appear in another textbox. how to code it ?
Answer For each textbox I would create a hidden input variable with the same index as your textbox.
So, for example,
<input type="Text" name="name1" value="1">
<input type"hidden" name="hidden1" value="John Smith">
Associate javascript function on blur, or whenever the user finishes entering his input.
In this javascript function you could parse the last digit of the textbox in question (1) and concatenate it with hidden filed. Once all is done, just query the value of the hidden filed for the user name.
Hope this helps,
Regards,
Robert
Add to this Answer Ask a Question
|
|