Forum Moderators: open
In order to do this, you have two options:
If the list of values in the db are not very many, you could load them all up into a javascript array, and check the value of the first box against that array. (You don't want to do this if you have too many values, or if the values keep changing, etc).
Otherwise, and possible the easier way, upon filling in the first field, the form submits itself to a cgi script (PHP, ASP, PERL, or whatever your site is running), which checks the value against the db and returns a status message to the user (either try again, or value exists).
As to the code, it depends on your exacts needs, and the serverside code you're running. Try out a few resources likes dynamicdrive.com or javascript.internet.com for the JS.
Best of luck!
Use onFocus to execute javascript which does a server query for the data in question by loadign a page into a hidden iframe. Use onload on that page to activate te desired action according to teh result of the DB lookup, such as popping up a notification or populating the second list box as you like.
SN