Ignore:
Timestamp:
Apr 7, 2015 1:52:40 PM (10 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/assets/js/frontend/user.js

    r838 r883  
    4545                       
    4646                        if ($(".form-field-province").val() !== 'undefined'){
    47                                 checkSelecteDistrict();
     47                                checkSelectedDistrict();
    4848                        }
    4949                        $(".form-field-province").change(function(){
     
    121121                success: function (data, textStatus, jqXHR)
    122122                {       
    123                 console.log(data);
    124123                        result = jQuery.parseJSON(data);
    125124                        if (result.success == "1")
     
    286285}
    287286
    288 function checkSelecteDistrict(){
     287function checkSelectedDistrict(){
    289288        provinceId = $(".form-field-province").val();
    290289        $.ajax({
     
    309308}
    310309
    311 if ($(".form-field-province").val() !== 'undefined'){
    312         checkSelecteDistrict();
    313 }
    314 
    315310function changeEventProvince(){
    316311        $(".form-field-district").html("");
     
    332327    });
    333328}
    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        });
    337336});
Note: See TracChangeset for help on using the changeset viewer.