Guest User

Untitled

a guest
Aug 5th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.         $('#country').change(function(){
  3.             var id_country = $(this).val();
  4.             $.ajax({
  5.                     type: "POST",
  6.                     url: "ajax_base.php",
  7.                     data: "action=showRegionForInsert&id_country="+id_country,
  8.                     cache: false,
  9.                     success: function(responce){
  10.                         $('#selectDataRegion').html(responce);
  11.                     }
  12.                 });
  13.         });
  14.         $('#selectDataRegion').on('change','select',function(){
  15.             var id_region = $(this).val();
  16.             $.ajax({
  17.                     type: "POST",
  18.                     url: "ajax_base.php",
  19.                     data: "action=showCityForInsert&id_region="+id_region,
  20.                     cache: false,
  21.                     success: function(responce){ $('#selectDataCity').html(responce); }
  22.             });
  23.         })
  24.     })
Advertisement
Add Comment
Please, Sign In to add comment