-----Original Message-----
I would like to have an input form to update a data base
(got that working), but on something like a ZIP code,
have a drop-down list (from an Access Database Results)
*OR*, if it's not in the drop-down, enable the user to
enter a different ZIP in the same box.
Could someone point me to a tutorial or example?
Browsers can't display combo boxes, which are the sort of
drop-down lsit where you can also type values by hand. As
a result, your form will need to present the drop-down
lists of ZIP codes and a text box for other values as two
separate controls.
Unfortunately, I can't think of any way to manage the
interaction between these two controls, except by writing
some ASP or ASP.NET code. This code would prepare the
initial form, process the submitted form, or both.
The problem is that in older versions of Netscape,
JavaScript code running on the browser can't get the value
of a drop-down list. It can only determine the selected
list item's position. So, you either have to:
o Send the list of ZIP codes to the browser twice: once
in the drop-down list and once in a JavaScript table.
That way, JavaScript code running on the browser
can get the selected item number from the drop-down
list, look up the value in the table, and zap the value
in to the text box.
The Database Results Wizard can create the drop-down
list box and populate it from the database, but it
can't create the corresponding JavaScript table.
o Make a decision, on the server, after the form
submission, which value to store in the database:
the value from the text box or the value from the
drop-down list.
Save Results To Database doesn't have this kind of
decision-making capability.
So, do you feel up to writing and managing some ASP or
ASP.NET code?
Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*