Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_city(UserProfileState)
- {
- var state_id=document.getElementById('UserProfileState').value;
- $.ajax({
- type: "GET",
- url: "get_city",
- data: "UserProfileState="+state_id,
- success: function(msg){
- $("#city").html(msg);
- }
- });
- }
- $("#chkform").click(function()
- {
- if($(this).is(":checked"))
- {
- $("#UserProfilePeraddress").val($("#UserProfilePaddress").val());
- $("#UserProfilePcountry").val($("#UserProfileCountry").val());
- $("#UserProfilePstate").val($("#UserProfileState").val());
- $("#UserProfilePcity").val($("#UserProfileCity").val());
- $("#UserProfilePpincode").val($("#UserProfilePcode").val());
- $("#UserProfilePtelephone").val($("#UserProfileTelephone").val());
- }}
- if($(this).is(":checked"))
- {
- $("#UserProfilePeraddress").val($("#UserProfilePaddress").val());
- $("#UserProfilePcountry").val($("#UserProfileCountry").val());
- $("#UserProfilePstate").val($("#UserProfileState").val());
- var state_id=document.getElementById('UserProfileState').value;
- var city_id=document.getElementById('UserProfileCity').value;
- $.ajax({
- type: "GET",
- url: "get_city",
- data: { UserProfilePState : state_id,
- UserProfilePcity : city_id },
- success: function(msg){
- $("#pcity").html(msg);
- }
- });
- $("#UserProfilePpincode").val($("#UserProfilePcode").val());
- $("#UserProfilePtelephone").val($("#UserProfileTelephone").val());
- }
Add Comment
Please, Sign In to add comment