Welcome Guest, Not a member yet? Register   Sign In
Dynamic Select Box
#3

The selection field remains disabled


Code:
            <script type="text/javascript">
                $(document).ready(function(){
                   $('#add_edition2').on('change', function(){
                        var tb_edition_id = $(this).val();
                        if(tb_edition_id == '')
                        {
                            $('#add_rare2').prop('disabled', true);
                        }
                        else
                        {
                            $('#add_rare2').prop('disabled', false);
                            $.ajax({
                                site_url() . 'karte/get_province/' . $slug;
                                // site_url() . '<?php echo base_url() ?>karte/get_province/' . $slug;
                                // url:"<?php echo base_url() ?>karte/get_province",
                                type: "POST",
                                data: {'tb_edition_id' : tb_edition_id, '$slug' : slug },
                                // data: {'tb_edition_id' : tb_edition_id},
                                dataType: 'json',
                                success: function(data){
                                   $('#add_rare2').html(data);
                                },
                                error: function(){
                                    alert('Nix da...!!');
                                }
                            });
                        }
                   });
                });
            </script>

PS.
Found the video now
https://www.youtube.com/watch?v=QTfPlTCsVME
Reply


Messages In This Thread
Dynamic Select Box - by Germanikus - 09-28-2017, 05:42 AM
RE: Dynamic Select Box - by Wouter60 - 09-28-2017, 12:42 PM
RE: Dynamic Select Box - by Germanikus - 09-28-2017, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB