sergiodlopes / jquery-flexdatalist

Flexible input autocomplete/datalist plugin for jQuery
http://projects.sergiodinislopes.pt/flexdatalist/
MIT License
365 stars 84 forks source link

cannot get remote json via data-url work #250

Open halukkaramete opened 1 week ago

halukkaramete commented 1 week ago

What's wrong here? So nothing matches?

got 0 js errors or any issues.

i think the error the way I link to .json

                <link href="/videoHub/_PLUGINS/flex/jquery.flexdatalist.min.css" rel="stylesheet" type="text/css">
                <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js'></script>
                <script src="/videoHub/_PLUGINS/flex/jquery.flexdatalist.min.js"></script>

                <input type='text'
                    placeholder='Write your country name'
                    class='flexdatalist'
                    data-url='https://projects.sergiodinislopes.pt/flexdatalist/countries.json'
                    data-search-in='name'
                    multiple='multiple'
                    data-min-length='1'
                    name='country_name_suggestion_multiple'>
                <script>
                    window.onload = function() {

                        $('.flexdatalist').flexdatalist({
                            minLength: 1,
                            searchIn: 'name',
                            url: 'https://projects.sergiodinislopes.pt/flexdatalist/countries.json'
                        });
                    };
                </script>
halukkaramete commented 1 week ago

I think the json must be run on my server, that's the issue.