Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: open
first php page pulls values from mysql db for combo box # 1.
id ¦ name
1 ¦ car
2 ¦ truck
3 ¦ SUV
4 ¦ unicycle
The output is sent to .innerHTML and creates combo box #1
A second php script pulls data for combo box # 2 based on the first combo box (second function).
id ¦ list ¦ autotype_id
1 ¦ pink car ¦ 1
2 ¦ blue car ¦ 1
3 ¦ pickup ¦ 2
4 ¦ bmw ¦ 3
5 ¦ clowns ¦ 4
third php script pulls data detail for your select of the item from the second combo box.
The output is sent to .innerHTML and creates combo box #2
The page grows by your selections...
First comb box, then second, then details.
It works almost perfectly, when the second combo box changes, the details change with it. But when you change the first combo box, the details remain from the last choice. I wanted to find a way to run a command when the first combo box is changed that would reset the details either back to nothing and wait for you to select something on the second combo box again.
I tried concatenating a second command onto the first onchange, but it never worked.
I've searched the forums and found similar problems, but none that matched exactly.
Thank you all for your help in advance.