Dynamic Select with query

Asked

Viewed 112 times

0

I want to make a dynamic form like this: https://www.w3.org/WAI/WCAG20/Techniques/working-examples/SCR19/dynselect.html

I am having difficulties in connecting mysql, php and javascript to the following extent: -The first select options values are generated by a query (Select * from Continent)

-As the selected Continent automatically generates the Country select options by doing the query (Select * from Country Where id_continent="id")

1 answer

1

You can use a . getJSON() in your javascript and resume a list of country options ...

$.getJSON("SelecionarPaises.php", data : idcontinente).done(function (paises) {
// vai receber uma lista de paises aqui, ai pode adicionar onde quiser
});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.