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 ;)
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,
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",
Tty to use this
http://fromvega.com/wordpress/2007/05/05/auto-complete-field-with-jquery-json-php/
Maybe it helps
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
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
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ö
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/
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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")
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
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,
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
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,
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
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
That "strange" format *is* JSON !
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
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
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
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
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
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
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
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
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
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
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"
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
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
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
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
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
>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
47 matches
Mail list logo