Load data into dropdown with ajax, php and mysql

Glad it’s working for you.

Looking at another topic on here ( Html elements are not accessed in ajax success function ) as I’m not really up on JS / Ajax, can’t you do something like

$('#userGroup').hide();

to hide the div containing the dropdown, based on whatever criteria you have? So if it’s based on a previous selection value, you’d trap the ‘change’ event on that dropdown and, if it’s set to the value you need, then hide the div.

1 Like