I have 2 drop down boxes. When the user changes the values in one drop
down box, the values in another drop down box will be changed on the fly.
Is it possible to do that? in client side or server side? what's the
best approach to this problem?
Yes, it is possible to do it both client-side and server-side. The best
approach is to actually use both: attempt to do it on the client first and
if that fails, fall back to the server. It's a little more work for you,
but it provides both a quick and robust interface. If the script is kept
in an external file (and it should), it should also reduce the total
traffic as unscriptable user agents won't download unnecessary data.
A generic client-side solution would be too bloated, so if you want a
demonstration, it would be best to provide more information, preferably
showing the page that will contain this feature.
If you don't have the necessary server-side support (so only a client-side
solution is possible), Richard Cornford provides a possible answer:
<URL:
http://www.litotes.demon.co.uk/example_scripts/dependent_select.html>.
Mike