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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy input from a text field into another text field

Status
Not open for further replies.

coolicus

Programmer
May 15, 2007
50
GB
Is it possible to copy input from a text field into another text field, but minus the space?

So if someone types into text1

tek tips is great

into text2 goes

tektipsisgreat

The field can either be populated when the user clicks away from text1 or as each key is presed, which is easier?

Thanks folks
 
Is it possible to copy input from a text field into another text field, but minus the space?

Yep. Look into the string method replace

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top