How to Create Dynamic Dependent select box using ajax
You need a dynamic dependent select box. We will explain how to create a dynamic dependent select box in PHP, jquery and ajax. index.php <?php include_once 'dbconfig.php'; ?> <html> <head> <title>Dynamic Dependent Select Box using Ajax</title> <script type="text/javascript" src="jquery-1.4.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#loding1").hide(); $("#loding2").hide(); $(".country").change(function() { $("#loding1").show(); var id=$(this).val(); var dataString = 'id='+ id; $(".state").find('option').remove(); $(".city").find('option').remove(); $.ajax ({ type: "POST", url: "get_state.php", data: dataString, cache: false, success: function(html) { $("#loding1").hide(); $(".state").html(html...