Guest User

Untitled

a guest
Jan 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. function get_city(UserProfileState)
  2. {
  3. var state_id=document.getElementById('UserProfileState').value;
  4. $.ajax({
  5. type: "GET",
  6. url: "get_city",
  7. data: "UserProfileState="+state_id,
  8. success: function(msg){
  9. $("#city").html(msg);
  10. }
  11. });
  12. }
  13.  
  14. $("#chkform").click(function()
  15. {
  16. if($(this).is(":checked"))
  17. {
  18. $("#UserProfilePeraddress").val($("#UserProfilePaddress").val());
  19. $("#UserProfilePcountry").val($("#UserProfileCountry").val());
  20. $("#UserProfilePstate").val($("#UserProfileState").val());
  21. $("#UserProfilePcity").val($("#UserProfileCity").val());
  22. $("#UserProfilePpincode").val($("#UserProfilePcode").val());
  23. $("#UserProfilePtelephone").val($("#UserProfileTelephone").val());
  24.  
  25. }}
  26.  
  27. if($(this).is(":checked"))
  28. {
  29. $("#UserProfilePeraddress").val($("#UserProfilePaddress").val());
  30. $("#UserProfilePcountry").val($("#UserProfileCountry").val());
  31. $("#UserProfilePstate").val($("#UserProfileState").val());
  32. var state_id=document.getElementById('UserProfileState').value;
  33. var city_id=document.getElementById('UserProfileCity').value;
  34. $.ajax({
  35. type: "GET",
  36. url: "get_city",
  37. data: { UserProfilePState : state_id,
  38. UserProfilePcity : city_id },
  39. success: function(msg){
  40. $("#pcity").html(msg);
  41. }
  42. });
  43. $("#UserProfilePpincode").val($("#UserProfilePcode").val());
  44. $("#UserProfilePtelephone").val($("#UserProfileTelephone").val());
  45.  
  46. }
Add Comment
Please, Sign In to add comment