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!

dynamically reload data in textfield

Status
Not open for further replies.

commun1

Programmer
May 26, 2004
41
0
0
DE
hi.

um, I have two textfields and if you enter a number into field 1 it write the associated value that is within my mysql-table into my second textfield...

e.g. if someone enters the digit "12345" into textfield1 it should say "textentry 1" in textfield2.

as I mentioned, I have a table that consists of unique ids (equals the digit someone enters) and it should take the value of my tabledata and put it into the other textfield.

is there a way to request data from my DB using javascript as trigger for mysql queries or do I have to write all my DB data into a javascript array?
 
Look into XMLHttpRequest.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
@tsdragon

looks cool but ain't that too complex for my needs?
 
Here are your options.

- Use Tracy's method
- Use a hidden frame
- Reload the page when field1 changes
- Write all your values to an array when the page loads

The first one is the fastest in terms of performance. It's really not that complex if you Google for a tutorial.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top