The answer depends on a few things:
1) Whether or not you are willing to issue a new page request in order
to populate the second list.
2) How much data do you have.
With JavaScript, you'll basically need to download the whole dataset
to the client - which is probably not fair and may even cause a crash
on less well equipped systems, whereas a quick request back to the
server would be pretty breezy by comparison.
OTOH, if you your data set is fairly small (try exporting everything
to a CSV and see what the KB weight is (<120 is a good target); then
JavaScript probably is worth the effort just to avoid an ugly page
refresh.
It is a myth that JavaScript is significantly more difficult than PHP.
A little obtuse, perhaps, but it would be a short leap. There is an
abundance of script templates that do exactly what you describe. I
particularly like hotscripts.com as a resource for this.
Good Luck
On 30 Nov 2004 14:16:21 -0800,
ad***********@hotmail.com (adam) wrote:
Hi - im looking to have two drop down boxs one with makes of car and
the second drop down box to automatically populate with all the model
of that particular make of car. there are about 50 makes and upto 50
models per make.
I just would like to know the best way to do this - javascript or use
a database? it would be a lot of code todo it in javascript wouldnt
it?? help is very much appreciated thanks guys.
Ciao,
Ginzo
---------------------------------
War is god's way of teaching
Americans geography
-- Ambrose Bierce
---------------------------------