[jQuery] Re: JSON- PHP generated JS-file question

2009-06-04 Thread Kristof
yeah i figured that out, but still have some problems though. I found a way to filter, but its not ideal just yet. It's something i found on the internet but it works with some sort of array (respone.values). To receive the objects in the array there is an other function needed. This just seems

[jQuery] Re: JSON- PHP generated JS-file question

2009-06-03 Thread Charlie
you can search the json array with $.each var nameWanted = "a"; var data=""> {"id":"2","prijs":"5","naam":"b"}, {"id":"3","prijs":"22","naam":"c"}]}} $.each(data.channel.items,function(i,item) { if (data.channel.items[i].naam == nameWanted) { index=i; prijsWanted=

[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread jsuggs
Look at some of the auto-complete plugins, they do a lot of what you are asking for already including caching of results so that you don't have to do as many lookups or requests. http://plugins.jquery.com/project/autocompletex http://plugins.jquery.com/project/js-autocomplete

[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread James
I don't mean to step on your idea, but I think the database method probably works better. Databases are usually highly optimized to do text-search and it should be fairly quick. By using the separate JSON file method, you're just placing all the processing work on the client- side, which might

[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread Kristof
thanks for your insight. Well the idea is to make a small offline bank/ cash register? (where you can create an invoice per client each time he/she buys something.) So basically for my project i could use the DB method but if i ever want to make it for a big client that has 1000 products and

[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread Kristof
i like the idea of building in a treager. each time the user ads a new product or changes a product i could rewrite the new file. Good idea thanks! thanks for the URLs too ! On Jun 2, 8:02 pm, jsuggs jsu...@gmail.com wrote: Look at some of the auto-complete plugins, they do a lot of what you