J
Jens Körte
Hi!
I've got a typical newbie-problem, I guess.
I got some selectboxes on my site. these boxes get their data from a
databse. everything works fine, but when a user selects a value from
one of the boxes i want to change the values from the other boxes
dynamically. The values are derived from the database. Initially the
boxes get for example those inputs:
Box1 --> SELECT * FROM VEHICLE
Box2 --> SELECT * FROM CAR
If a user selects "car" from Box1, Box2 must change his content so
that only cars are shown, i.e. no trucks, no bicylces, etc...
Something like that:
SELECT c.name FROM CAR c WHERE VEHICLE = 'car'
With the onChange-event I can handle the values. No problem with that.
But how do I get the data from the database into the
javascript-statement. How do I have to handle this. I have no idea.
Please help...
Jens
P.S. I only want to use PHP, HTML and Javascript.
I've got a typical newbie-problem, I guess.
I got some selectboxes on my site. these boxes get their data from a
databse. everything works fine, but when a user selects a value from
one of the boxes i want to change the values from the other boxes
dynamically. The values are derived from the database. Initially the
boxes get for example those inputs:
Box1 --> SELECT * FROM VEHICLE
Box2 --> SELECT * FROM CAR
If a user selects "car" from Box1, Box2 must change his content so
that only cars are shown, i.e. no trucks, no bicylces, etc...
Something like that:
SELECT c.name FROM CAR c WHERE VEHICLE = 'car'
With the onChange-event I can handle the values. No problem with that.
But how do I get the data from the database into the
javascript-statement. How do I have to handle this. I have no idea.
Please help...
Jens
P.S. I only want to use PHP, HTML and Javascript.