Okay, so I have 2 select boxes on my page, the first with the name "select" with the following options hard-coded:
<select name="select" id="Testid">
<option value="Misc">Misc...</option>
<option value="Stunt">Stunt</option>
<option value="deathmatches">Deathmatches</option>
<option value="Car"> Car </option>
<option value="Races">Races </option>
</select>
The second select box however (named "deleteTp") I want to populate with a mysql table depending on the selection of the first select box. Each option value has a specific table in my database with the same name as the value.
I know how to populate the second select box with the database table, however I'm not sure how to do this dynamically depending on the users choice.
Please note I only know basic javascript.
And if you're wondering why I am trying to do this, it's because the second selectbox will be posted to an external page to delete the rows from the populated table.
Thank you for your time.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…