Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

taxtbox auto fill?

Status
Not open for further replies.

gogotina

Vendor
Joined
Aug 21, 2006
Messages
2
Location
US
Can anyone show me a way to take an input from a form text box and add it to the next 10 input boxes (+ 1). For instance, if the user iin puts "aaaa" I wnat the next 10 input boxes to be "aaab", "aaac", "aaad".... any help would be great
 
do you really want to append an "a", "b", "c" in that order? what if there is more than 26 textboxes? is there a naming convention to the textboxes? how do you want this to occur? on a button click? or when the original text box loses focus?



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Sorry for not giving all the info needed. Im new at all this, and it is hard to teach an old dog new tricks. Yes I would like to go all the way though to 26 textboxes "a-z" and maybe adding 0-9 also. So it could reach 36 inputboxes. I am just trying to offer the user choices close to what they input.
 
to get the value of a textbox, use this syntax:
Code:
var myVal = document.forms['myFormName'].elements['myTextBoxName'].value;
to set the value of a textbox, use this syntax:
Code:
document.forms['myFormName'].elements['myOtherTextBoxName'].value = myVal + "a";
that should get you off to the right start.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top