GithubHelp home page GithubHelp logo

Comments (6)

joshuaballoch avatar joshuaballoch commented on June 15, 2024

@MarcDD I found this issue that is related to your question: #31

However, I have tested this myself and have yet to make this work. Will update you otherwise.

from ajax-chosen.

joshuaballoch avatar joshuaballoch commented on June 15, 2024

@MarcDD I have verified that this works, check the link in the previous comment.

from ajax-chosen.

dsingh948 avatar dsingh948 commented on June 15, 2024

jQuery(function($){

$(document).ready(function() {

    $("#suburbsfilter").ajaxChosen({

minTermLength:1,
type: 'GET',
url: '<?php echo base_url(); ?>frieght-admin/addseo_other/getsuburb',
dataType: 'json'

}, function (data) {
var results = [];

$.each(data, function (i, val) {
    results.push({ value: val.value, text: val.text });
});

return results;

},{"allow_single_deselect": true ,no_results_text: "Oops, nothing found!"}

);

});});

this is not working....

"allow_single_deselect": true ,no_results_text: "Oops, nothing found!"
still showing same looking message ...and dropdwon is still not de selectable ...
using all latest files for jquery....

from ajax-chosen.

wejrowski avatar wejrowski commented on June 15, 2024

I can't get this to work either!.. with same field I try just using .chosen({ allow_single_deselect:true }) and that works, but not with ajaxChosen

from ajax-chosen.

wejrowski avatar wejrowski commented on June 15, 2024

Oops it DOES work. I had to put the extra chosen JSON as an additional field. I was appending it to the ajaxChosen options in first argument which wasn't working.

from ajax-chosen.

jahrralf avatar jahrralf commented on June 15, 2024

@wejrowski Could you please post a full example? I also have problems, this problem is driving me nuts...

What I have now is this:

        $("#account_id").ajaxChosen({
            type: 'GET',
            url: '<?= url_for("my_talk/autocomplete_account_json") ?>',
            dataType: 'json'
        }, function (data) {
            var results = [];

            $.each(data, function (i, val) {
                results.push({value: val.value, text: val.text});
            });

            return results;
        }, {
            allow_single_deselect: true
        }, {
            allow_single_deselect: true
        });

from ajax-chosen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.