PageSourceSearch

https://gcp2.net/js/getstates.js?2.0.16

js gcp2.net collected 2026-10-02 16:19:45 UTC 2,982 bytes, 92 lines download raw bytes

1$(document).ready(function () {
2    $('#address-country').on('change', function () {
3        const getStatesUrl = $('#getStatesUrl').val();
4        var idCountry = this.value;
5        // alert(idCountry);
6        iti.setCountry(idCountry);
7        $("#state-dd").html('');
8        getDialCode();
9        $.ajax({
10            // url: "{{route('get.states')}}",
11            url: getStatesUrl,
12            type: "GET",
13            data: {
14                country_id: idCountry,
15                // _token: '{{csrf_token()}}'
16            },
17            dataType: 'json',
18            headers: {
19                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
20            },
21            success: function (result) {
22                // console.log("data",result.states);
23                $('#state-dd').html('<option value="">Select State</option>');
24                $.each(result.states, function (key, value) {
25                    $("#state-dd").append('<option value="' + value
26                        .id + '">' + value.name + '</option>');
27                });
28            },
29            error: function (response) {
30                // console.log("data",result.states);
31                $('#state-dd').html('<option value="not_found">No States Found</option>');
32            }
33        });
34    });
35});
36
37
38
39// $(document).ready(function () {
40//     $('#address-country').on('change', getStates());
41// });
42
43// function getStates(){
44//         const getStateUrl = $('#getStateUrl').val();
45//         const idCountry = $('#address-country').val();
46//          alert("country value",idCountry);
47
48//         var value = 'in';
49//         iti.setCountry(value);
50
51
52
53
54//         $("#state-dd").html('');
55//         $.ajax({
56//             // url: "{{route('get.states')}}",
57//             url: getStateUrl,
58//             type: "POST",
59//             data: {
60//                 country_id: idCountry,
61//                 // _token: '{{csrf_token()}}'
62//             },
63//             dataType: 'json',
64//             headers: {
65//                 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
66//             },
67//             success: function (result) {
68//                 // console.log("data",result.states);
69//                 $('#state-dd').html('<option value="">Select State</option>');
70//                 $.each(result.states, function (key, value) {
71//                     $("#state-dd").append('<option value="' + value
72//                         .id + '">' + value.name + '</option>');
73//                 });
74//                 getDialCode();
75//             },
76//             error: function (response) {
77//                 // console.log("data",result.states);
78//                 $('#state-dd').html('<option value="not_found">No States Found</option>');
79//             }
80//         });
81// }
82
83
84
85
86
87
88function getDialCode(){
89    let inputData = iti.getSelectedCountryData();
90    $('#dialCountryCode').val('+'+inputData['dialCode']);
91    console.table(inputData);
92}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.