baseline 7.4 as-is produzione
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// ajax script for getting state data␍
|
||||
$(document).on('change','#country', function(){␍
|
||||
var countryID = $(this).val();␍
|
||||
if(countryID){␍
|
||||
$.ajax({␍
|
||||
type:'POST',␍
|
||||
url:'backend-script.php',␍
|
||||
data:{'idarticletype':countryID},␍
|
||||
success:function(result){␍
|
||||
$('#state').html(result);␍
|
||||
␍
|
||||
}␍
|
||||
}); ␍
|
||||
}else{␍
|
||||
$('#state').html('<option value="">Country</option>');␍
|
||||
$('#city').html('<option value=""> State </option>'); ␍
|
||||
}␍
|
||||
});␍
|
||||
␍
|
||||
// ajax script for getting city data␍
|
||||
$(document).on('change','#state', function(){␍
|
||||
var stateID = $(this).val();␍
|
||||
if(stateID){␍
|
||||
$.ajax({␍
|
||||
type:'POST',␍
|
||||
url:'backend-script.php',␍
|
||||
data:{'state_id':stateID},␍
|
||||
success:function(result){␍
|
||||
$('#city').html(result);␍
|
||||
␍
|
||||
}␍
|
||||
}); ␍
|
||||
}else{␍
|
||||
$('#city').html('<option value="">City</option>');␍
|
||||
␍
|
||||
}␍
|
||||
});
|
||||
Reference in New Issue
Block a user