0
Question: I have 2 Select Menu and I need the second select to change with data group according to the choice of the first one. For example, make of cars and models. In the first select the brands and in the second select the models.
Testing: I’ve tried several video formats on Youtube and from here, I searched on Google and some work but most do not work and even when I adapt to the problem I need to solve ends up not working.
What I have: Mysql with all information. Two tables, one table only with tags and the other table with 2 columns (tag and template).
Last test: I tried to do a While to search, while the "value" of a select is the same as the other table, display the model records of the second table, only it only returns blank value. The connection of the database is working, because I do the test and returns result (by Dreamweaver) but the menu list box shows no result. Javascript command below:
<script type="text/javascript">
function exiv() {
var torinogv = document.getElementById("carrmarca").value;
var seniorgv = document.getElementById("carrmodelo").value;
var option = document.createElement("option");
while (seniorgv == torinogv) {
option = document.getElementById("carrmodelo").text;
seniorgv.appendChild(option);
}
}
</script>
I didn’t really understand your question. Is there any way to edit the question and start text by itself and not explain the last attempts? Type being more specific even.
– Francis Vagner da Luz
Edited, separated by sector, ta good now?
– César Mattos