Changeset 883 for pro-violet-viettel/sourcecode/assets/js
- Timestamp:
- Apr 7, 2015 1:52:40 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/assets/js
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/assets/js/admin/user.js
r838 r883 89 89 { 90 90 $('#user-history').modal('hide'); 91 //alert("Äã cáºp nháºt");91 92 92 location.reload(); 93 93 } … … 97 97 } 98 98 99 function checkSelecteDistrict(){ 100 provinceId = $(".form-field-province").val(); 99 function checkSelectedDistrict(provinceId){ 101 100 $.ajax({ 102 101 url: '/frontend/user/getDistrict/' + provinceId, … … 120 119 } 121 120 122 function changeEventProvince( ){121 function changeEventProvince(provinceId){ 123 122 $(".form-field-district").html(""); 124 provinceId = $("#form-field-province").val();125 123 $.ajax({ 126 124 url: '/frontend/user/getDistrict/' + provinceId, … … 139 137 }); 140 138 } 139 140 $(document).ready(function(){ 141 $(".form-field-province").change(function(){ 142 //alert("OK"); 143 changeEventProvince(); 144 }); 145 if ($(".form-field-province").val() !== 'undefined'){ 146 checkSelectedDistrict(); 147 } 148 }); -
pro-violet-viettel/sourcecode/assets/js/frontend/user.js
r838 r883 45 45 46 46 if ($(".form-field-province").val() !== 'undefined'){ 47 checkSelecte District();47 checkSelectedDistrict(); 48 48 } 49 49 $(".form-field-province").change(function(){ … … 121 121 success: function (data, textStatus, jqXHR) 122 122 { 123 console.log(data);124 123 result = jQuery.parseJSON(data); 125 124 if (result.success == "1") … … 286 285 } 287 286 288 function checkSelecte District(){287 function checkSelectedDistrict(){ 289 288 provinceId = $(".form-field-province").val(); 290 289 $.ajax({ … … 309 308 } 310 309 311 if ($(".form-field-province").val() !== 'undefined'){312 checkSelecteDistrict();313 }314 315 310 function changeEventProvince(){ 316 311 $(".form-field-district").html(""); … … 332 327 }); 333 328 } 334 335 $(".form-field-province").change(function(){ 336 changeEventProvince(); 329 $(document).ready(function(){ 330 if ($(".form-field-province").val() !== 'undefined'){ 331 checkSelectedDistrict(); 332 } 333 $(".form-field-province").change(function(){ 334 changeEventProvince(); 335 }); 337 336 });
Note: See TracChangeset
for help on using the changeset viewer.