Git Product home page Git Product logo

Comments (5)

ichord avatar ichord commented on May 30, 2024

I'm sorry, @windfly2k . I am afraid i can't give you a server side example.
Here is a client side example using remote_filter for caching. Hope it can help you.
If you still don't understand how to use it, Tell me which part is confusing you.

I get a little busy recently but i will enhance the documentation later, such as writing some example for each callback later.

It's good to know you like it. Thanks. 😃

from at.js.

windfly2k avatar windfly2k commented on May 30, 2024

Hi @ichord , sorry to bother you again, I studied the example as above given by you carefully however still got some questions, the main problem there is the ajax request can't be launched by using remote_filter with a url. I tried many times however it doesn't work at all. Can you give a completed example to show how to use an ajax request to get data from a remote server? I need to access remote data to add them on the list for selection with at.js, that's very important for my project.

Really appericate your kindly help!

Best regards,

windfly

from at.js.

ichord avatar ichord commented on May 30, 2024

I real don't know how to show you a complete example..
seems you misunderstand it's usage. You should launch ajax request on your own by remote_filter.

Try this:

what server side need to do is just return the json data like this:

[{"name":"Jacob"},{"name":"Isabella"},{"name":"Ethan"},{"name":"Emma"}]

client side:

$('.input').atwho("@", {
    data: "/data.json",
    callbacks: {
        remote_filter: function(params, url, callback) {
            $.ajax(url, {
                data: params
                success: function(data) {
                    $dom_list.html(data)
                    callback(data)
                }
            })
        }
    }
})

If you still get problem. tell me more details such as exception, error message and so so. I really don't know what happen if you don't give me more details.

from at.js.

ichord avatar ichord commented on May 30, 2024

@windfly2k oh. one more thing. Keep asking if you still get some problem, of course, if you would like to. It does matter.

from at.js.

ichord avatar ichord commented on May 30, 2024

related to #52

from at.js.

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.