[jQuery] Re: autocomplete and json

2009-02-27 Thread Jonny B
It seems there are a few undocumented features now in Autocomplete - see this demo: http://view.jquery.com/trunk/plugins/autocomplete/demo/json.html I've got mine (mostly) working now thanks to that (and thanks to zendog74 for the initial pointers ;)

[jQuery] Re: autocomplete and json

2009-02-19 Thread zendog74
FYI, I got this to work. Here is the code that I ended up with. Perhaps it will help others who run across the same problem: jQuery("#pocEmail").autocomplete("../screen/PersonLookup", { width: 275, minChars: 1, cacheLength: 25, selectFirst: false,

[jQuery] Re: autocomplete and json

2009-02-05 Thread zendog74
I managed to alias some of the classes to more simple names in my WS, so my JSON now looks like this. {"persons": {"person":[ {"personId__": 6,"firstName__":"Jack","lastName__":"Black","email__":"jbl...@jackblack.com"}, {"personId__": 1,"firstName__":"Joe",

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-18 Thread Lucius Vorenus
Tty to use this http://fromvega.com/wordpress/2007/05/05/auto-complete-field-with-jquery-json-php/ Maybe it helps

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-16 Thread shapper
Hi Jörn, Thank you for your help ... In fact I had that before but it was not working so I changed ... I realized it now that there were two problems: That one on my AutoComplete code and another one on the methods that returns the JSON when connecting to the SQL Server. I was able to spot it us

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-16 Thread Jörn Zaefferer
The formatItem implementation is wrong. You are returning the JavaScript object for the row (item) instead of a String to display. Try "return item.Name". Jörn On Wed, Jul 16, 2008 at 1:28 AM, shapper <[EMAIL PROTECTED]> wrote: > > Sorry for the delay ... > > I just changed the file. Check it no

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-15 Thread shapper
Sorry for the delay ... I just changed the file. Check it now. On Jul 15, 9:37 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Firebug shows an error when I enter something. Can't debug it with the > compressed script - replace that with the uncompressed one and we may > get somewhere. > > Jö

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-15 Thread Jörn Zaefferer
Firebug shows an error when I enter something. Can't debug it with the compressed script - replace that with the uncompressed one and we may get somewhere. Jörn On Tue, Jul 15, 2008 at 9:35 PM, shapper <[EMAIL PROTECTED]> wrote: > > Hi, > > Here it is: > http://www.27lamps.com/Beta/AutoComplete/

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-15 Thread shapper
Hi, Here it is: http://www.27lamps.com/Beta/AutoComplete/TagsUpdate.aspx And I kept the previous one: http://www.27lamps.com/Beta/AutoComplete/Tags.aspx Thank You, Miguel On Jul 15, 6:09 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > Please put the commented code back in. The current one is

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-15 Thread Jörn Zaefferer
Please put the commented code back in. The current one is rather useless. Jörn On Tue, Jul 15, 2008 at 4:31 PM, shapper <[EMAIL PROTECTED]> wrote: > > Does anyone knows how to solve this problem? > > Please, check my example in: > http://www.27lamps.com/Beta/AutoComplete/Tags.aspx > > On Jul 14,

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-15 Thread shapper
Does anyone knows how to solve this problem? Please, check my example in: http://www.27lamps.com/Beta/AutoComplete/Tags.aspx On Jul 14, 9:57 pm, shapper <[EMAIL PROTECTED]> wrote: > Jörn, > > I just uploaded an ASP.NET application that shows exactly what the > problem was. > The commented script

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread shapper
Jörn, I just uploaded an ASP.NET application that shows exactly what the problem was. The commented script code is the one I used to try to solve my problem but it does not work: http://www.27lamps.com/Beta/AutoComplete/Tags.aspx What should I do? Thanks, Miguel On Jul 14, 6:02 pm, "Jörn Zaef

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread Jörn Zaefferer
Learn to use Firebug - as I mentioned, the ajax request returns a 404. It still does. Please come back when you have an actual JavaScript problem. Jörn On Mon, Jul 14, 2008 at 6:16 PM, shapper <[EMAIL PROTECTED]> wrote: > > Jörn, > > I just uploaded all your example to my server and the json exa

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread shapper
Jörn, I just uploaded all your example to my server and the json example does not work: http://www.27lamps.com/Labs/AutoComplete/demo/json.html None of the remote works ... have no idea why. The same happens with my example: http://www.27lamps.com/Labs/AutoComplete/demo/tags.html Anyway, all I

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread Jörn Zaefferer
Open firebug and look at the request being send. A 404 is returned. Jörn On Mon, Jul 14, 2008 at 5:15 PM, shapper <[EMAIL PROTECTED]> wrote: > > That was a mistake when I uploaded the files ... I sent two wrong > files. > I just updated the files: > > http://www.27lamps.com/Labs/AutoComplete/dem

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread shapper
That was a mistake when I uploaded the files ... I sent two wrong files. I just updated the files: http://www.27lamps.com/Labs/AutoComplete/demo/tags.html Again it does not work. On Jul 14, 3:28 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > You forgot the document ready code. > > Jörn > > O

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread Jörn Zaefferer
You forgot the document ready code. Jörn On Mon, Jul 14, 2008 at 4:07 PM, shapper <[EMAIL PROTECTED]> wrote: > > Please, anyone? > > On Jul 14, 1:04 am, shapper <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I tried to replicate your code using the JSon string generated by >> ASP.NET MVC. >> I created

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-14 Thread shapper
Please, anyone? On Jul 14, 1:04 am, shapper <[EMAIL PROTECTED]> wrote: > Hi, > > I tried to replicate your code using the JSon string generated by > ASP.NET MVC. > I created a static php code as you did ... To be honest I am not > familiar with php. This was the best I was able to do ... > > I ha

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-13 Thread shapper
Hi, I tried to replicate your code using the JSon string generated by ASP.NET MVC. I created a static php code as you did ... To be honest I am not familiar with php. This was the best I was able to do ... I have been trying everything to make this work ... I really don't understand why my AutoC

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-13 Thread shapper
Hi, With ASP.NET this is not so easy ... Anyway, I tried to place your example and mine in the same page using PHP, which I am really not very familiar: http://www.27lamps.com/Labs/AutoComplete/AutoComplete.html Sorry, but I am not really use with PHP. Thanks, Miguel On Jul 13, 2:41 pm, "Jörn

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-13 Thread Jörn Zaefferer
You still haven't posted a testpage. It doesn't have to be dynamic, a static file that delivers the content that your serverside usually works just as well. Jörn On Sun, Jul 13, 2008 at 2:45 PM, shapper <[EMAIL PROTECTED]> wrote: > > Please, anyone? > > On Jul 12, 6:46 pm, shapper <[EMAIL PROTEC

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-13 Thread shapper
Please, anyone? On Jul 12, 6:46 pm, shapper <[EMAIL PROTECTED]> wrote: > Hi, > > I can upload the client part but I am generating my JSON using ASP.NET > MVC and the project is not finish so I can't upload it because it uses > a SQL server. > > Don't you have any idea what is going on? > > I set

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-12 Thread shapper
Hi, I can upload the client part but I am generating my JSON using ASP.NET MVC and the project is not finish so I can't upload it because it uses a SQL server. Don't you have any idea what is going on? I set up a page with this and I will try to explain what I get. When I use: $("#Tags")

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-12 Thread Jörn Zaefferer
Please upload a testpage and provide a link. There are too many things that can go wrong here. Jörn On Sat, Jul 12, 2008 at 3:32 PM, shapper <[EMAIL PROTECTED]> wrote: > > Hi, > > I tried to make this work following your example but until now I > wasn't able to make this work? > > Could you, ple

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-12 Thread shapper
Hi, I tried to make this work following your example but until now I wasn't able to make this work? Could you, please, help me out? This is what I have at the moment: $("#Tags").autocomplete("/File/GetTags", { autoFill: true, cacheLength: 1, multiple: true,

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-12 Thread Jörn Zaefferer
Remote json is still rather cumbersome to handle. Here is an example, take a look at the source: http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/json.html Jörn On Sat, Jul 12, 2008 at 1:01 AM, shapper <[EMAIL PROTECTED]> wrote: > > I also tried the following but until now I wasn't abl

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-11 Thread shapper
I also tried the following but until now I wasn't able to make it work: $("#Tags").autocomplete("/Professor/GetTags", { autoFill: true, cacheLength: 1, multiple: true, scrollHeight: 200, selectFirst: false, width: 260,

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-11 Thread shapper
Yes, I tried the following: $("#Tags").autocomplete("/File/GetTags", { width: 260, formatItem: function(item) { return item.Name; } }); But this is not working. Any idea? Thanks, Miguel On Jul 11, 7:03 pm, tlphipps <[EMAIL PROTECTED]> wrote: > You

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-11 Thread tlphipps
You need to use the formatResult option (I think that's the option name). It will allow you to format the data for display. On Jul 11, 12:08 pm, shapper <[EMAIL PROTECTED]> wrote: > Hello, > > I am using JQuery AutoComplete with JSon. I created a function on my > server code which return the dat

[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.

2008-07-11 Thread MorningZ
That "strange" format *is* JSON !

[jQuery] Re: Autocomplete and JSON

2008-04-14 Thread Jörn Zaefferer
dineshv schrieb: Say, there are 10,000 items in a server database and we set MAX=100. Assume the user entry Q="the" results in 250 entries. The server sends all 250 entries to the browser but Autocomplete (AC) will only use the first MAX=100 entries. The 100 entries are displayed in a scroll b

[jQuery] Re: Autocomplete and JSON

2008-04-14 Thread dineshv
Say, there are 10,000 items in a server database and we set MAX=100. Assume the user entry Q="the" results in 250 entries. The server sends all 250 entries to the browser but Autocomplete (AC) will only use the first MAX=100 entries. The 100 entries are displayed in a scroll bar. If the user sc

[jQuery] Re: Autocomplete and JSON

2008-04-09 Thread dineshv
Actually, you don't need the simplejson at the server. This works: def GET(self): result = "" for item in data: print item On Apr 9, 1:36 pm, dineshv <[EMAIL PROTECTED]> wrote: > Hi Ashley > > I'll work through your code but sending each item one at a time fr

[jQuery] Re: Autocomplete and JSON

2008-04-09 Thread dineshv
Hi Ashley I'll work through your code but sending each item one at a time from the server will also work. It is working for me right now ie. def GET(self): result = "" for item in data: result = simplejson.dumps(item) print result Dinesh On Apr

[jQuery] Re: Autocomplete and JSON

2008-04-08 Thread Ashley Pond V
On Apr 8, 2008, at 10:53 AM, dineshv wrote: > Okay, I sorted out the previous problem and can get data from the > Python backend to the browser via the Autocomplete plugin. But, the > test data: > > data = ["string 1", "string 2", "string 3", "string 4", "string 5"] > > ... displays as one string

[jQuery] Re: Autocomplete and JSON

2008-04-08 Thread dineshv
Okay, I sorted out the previous problem and can get data from the Python backend to the browser via the Autocomplete plugin. But, the test data: data = ["string 1", "string 2", "string 3", "string 4", "string 5"] ... displays as one string item ie.: ["string 1", "string 2", "string 3", "string

[jQuery] Re: Autocomplete and JSON

2008-04-07 Thread dineshv
Sorry, that first error should have said: > 404 - http://127.0.0.1:8080/act?q=a&limit=150 Jorn / Shawn In my act.js, I have: > $("#suggest").autocomplete("/act"); The act.html file displays with the input box. When I enter, for example 'a', the following error appears: > http://127.0.0.1:8

[jQuery] Re: Autocomplete and JSON

2008-04-07 Thread dineshv
Jorn / Shawn In my act.js, I have: > $("#suggest").autocomplete("/act"); The act.html file displays with the input box. When I enter, for example 'a', the following error appears: > http://127.0.0.1:8080/act?q=a&limit=150 and > line 2723 in http://127.0.0.1:8080/static/js/jquery-autocomplet

[jQuery] Re: Autocomplete and JSON

2008-04-06 Thread Ashley
This is possible but a bit difficult with the plugin. I wish it were easier as I don't think there is yet a jQuery autocomplete that competes with those from other packages like YUI. You have to override the 'parse' and 'formatItem' functions. Here is an example of it that I'm using. var autoc

[jQuery] Re: Autocomplete and JSON

2008-04-06 Thread Jörn Zaefferer
dineshv schrieb: Many thanks Shawn and Jorn - the use of the MAX parameter makes sense now. Onto, Ajax and JSON. On the Autocomplete site there is an example as follows: EXAMPLE Autocomplete a text-input with data received via AJAX. For small to medium sized datasets. JavaScript: $.getJS

[jQuery] Re: Autocomplete and JSON

2008-04-05 Thread dineshv
Many thanks Shawn and Jorn - the use of the MAX parameter makes sense now. Onto, Ajax and JSON. On the Autocomplete site there is an example as follows: EXAMPLE Autocomplete a text-input with data received via AJAX. For small to medium sized datasets. JavaScript: $.getJSON("my_backend.php"

[jQuery] Re: Autocomplete and JSON

2008-04-02 Thread Shawn
As Jorn said (and he'd be THE definitive source as the author of that plugin) - the MAX parameter is not used by the server. Otherwise, I think you have the gist of it. The routine regarding the MAX goes like so: - user enters some text - that text is passed to the server side code via the

[jQuery] Re: Autocomplete and JSON

2008-04-02 Thread Jörn Zaefferer
dineshv schrieb: Hi Shawn. Thank-you very much for the clear explanation. I mean "remote" as in "the same domain". Let's see if I understand your explanation: A large number (>10,000) of string items are held in a database (or array) at the server. We want to make the string items available

[jQuery] Re: Autocomplete and JSON

2008-04-02 Thread dineshv
Hi Shawn. Thank-you very much for the clear explanation. I mean "remote" as in "the same domain". Let's see if I understand your explanation: A large number (>10,000) of string items are held in a database (or array) at the server. We want to make the string items available to the autocomplet

[jQuery] Re: Autocomplete and JSON

2008-04-01 Thread Shawn
When you say remote, do you mean another domain?? If so, then yes there are some problems there, but your server side page for getting your results can handle that. If you mean remote as in "not on the same web page, but from a file/database accessible in the same domain", then I suspect a

[jQuery] Re: Autocomplete and JSON

2008-04-01 Thread dineshv
Thanks Hamish but as far as I can tell this is a known problem ie. retrieving remote JSON-format data using the autocomplete plugin. Be great to hear from folks who know if this has been fixed in the latest autocomplete plugin code and if example code exists to show how it is done. Cheers! Dines

[jQuery] Re: Autocomplete and JSON

2008-04-01 Thread Hamish Campbell
>The JSON example on the autocomplete > site doesn't work as it sends the entire > remote data to the browser instead of > returning just a limited number of items. Probably becuase it requires a backend page to provide dynamic results based on the search query. Note: When the user starts t