dependent-dropdown-example icon indicating copy to clipboard operation
dependent-dropdown-example copied to clipboard

If user select None(-------) country, it must not makes ajax requests to server.

Open suhailvs opened this issue 5 years ago • 0 comments

if (countryId == 0) { //Not selected $("#id_city").html("<option value=''>---------</option>"); } else

  • disable the city select while the ajax request: $("#id_city").prop('disabled',true);

  • after ajax request, enable the city select: $("#id_city").removeAttr("disabled");

suhailvs avatar Jul 14 '18 16:07 suhailvs