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. Like for example car brand and models. In the first select the marks and in the second the models.
Testing: I have tried several formats of videos on Youtube and from here, I searched Google and some work but most do not work and even when I adapt to the problem I need to solve, it does not work.
What I have: Mysql with all information. Two tables, one table with only marks and the other table with 2 columns (make and model).
Last test: I tried to do a While to search, while the value of a select is equal to that of the other table, to display the records of the model of the second table, but only returns a blank value. The database connection is working because I test and return the result (by Dreamweaver) but in the list box menu does not show result. Command for Javascript that follows 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>