[jQuery] Autocomplete, extraParams and this

2010-03-03 Thread olly
Hi there,

been searchin' for a solution for hours, hope someone here can help me
out.

This what I'm trying to do, I have several inputs on one page with
autocomplete. I need to pass a variable based on the input field the
user is in. So I decided to go with having this information as id
value.

I've found several solutions for autocompletes only called by the id,
not the class,

  $(.autocomplete).autocomplete (getAutocompleteValue.php', {
extraParams: { type: $(this).attr ('id') },
  });

Here is a way I found, but I can't get it to work:

  $(.autocomplete).each (function () {
var field = this;
$(field).setOptions({
  extraParams: {
type: function() { return field.id; }
  }
});
  });

By trying this, every autocomplete has the same extra params set as
the first autocomplete.

I think I'm just screwed up by trying for hours, so maybe someone has
a little hint or even a solution for my?

best olly


[jQuery] Autocomplete result rendering

2010-02-28 Thread ootieku
Hello,
I am using the Zorn autocomplete plug-in and it works great, thanks
Zorn. I was wondering if there is a method to override the rendering
of the ac_results div and list, to populate results in an alternate
element. Basically, I have a textarea with autocomplete enabled and a
div always visible on the page. I want the autocomplete results to
populate in the div. I suppose I could try to kill the hide function
and do some css on ac_results to achieve the effect I want, but I was
looking for something more elegant. If anyone has done this or could
give an example I would appreciate hearing from you.


[jQuery] jQuery AUTOCOMPLETE (by bassistance): submit on click

2010-02-18 Thread jjunior
I'm having a problem with the plugin.  Right now, when a user clicks
on a list of suggestions from the autocomplete, it takes that
selection and puts in the input.  The user then has to click again or
hit enter to submit the form.

It seems that most search forms work on a single click system: click
on the desired entry in the list and the desired search is executed.

Can anyone offer some assistance?

Thanks!


Re: [jQuery] jQuery AUTOCOMPLETE (by bassistance): submit on click

2010-02-18 Thread Rob Lacey

I'd imagine you'd want something like this?

 $('input#query').autocomplete('yoururl',{
.
your options
.
 }).result(function(event, item, formatted) {
 $(this).parents().find('form:first').submit();
 });

I hope this helps

RobL


jjunior wrote:

I'm having a problem with the plugin.  Right now, when a user clicks
on a list of suggestions from the autocomplete, it takes that
selection and puts in the input.  The user then has to click again or
hit enter to submit the form.

It seems that most search forms work on a single click system: click
on the desired entry in the list and the desired search is executed.

Can anyone offer some assistance?

Thanks!
  




[jQuery] Re: jQuery AUTOCOMPLETE (by bassistance): submit on click

2010-02-18 Thread jjunior

That's brilliant!  Thanks.


[jQuery] [Autocomplete] Problem with unordered multiple words

2010-02-08 Thread vincayou
Hello,

I'm using the bassistance version of autocomplete.

What I'd like to do, is getting my initial list filtered even if I add
words unordered :

If I type Marc, I will get a list of [Abb Marc, Trp Marc, Thx Marc]
If I keep writing Marc Ab.. by instance, the list dissapears because
it's not in the right order.

If I use multiple = true, It seems I get a new list with all the Abb
in it, but I only want Abb Marc.

I'd like to do something like http://www.hotels.com/

Is it possible ?


[jQuery] Autocomplete plugin compatability with jQuery 1.4?

2010-01-19 Thread Anthony Rayner
 Hi all,

We're using Jörn Zaefferer's awesome
'Autocompletehttp://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/'
plugin and wondered if anyone knows if it is compatible with jQuery 1.4? Be
very intereseted to find out.

Many thanks.
Anthony.


[jQuery] [autocomplete] Bug Reported with no response.

2010-01-19 Thread Andy M
I submitted a bug, as requested, to the jQuery bugtracker over a year
ago.  The bug was validated and assigned to Joern but has since sat
untouched for over a year.  The defect is at http://dev.jquery.com/ticket/3719.
I tested against the latest version and this bug is still there.
Anybody know if this is/will be addressed or do I just have to keep
patching the source every time there's an update?

Thanks.


[jQuery] Autocomplete: How to prevent multiple queries(url) to the backend when there is no match

2010-01-18 Thread Goblel
I'm trying to use autocomplete to send a query to our backend search
engine. This is working very well, howver, we are notcing that when we
submit a query for a substring such as foo and there is no match in
the results a subsquent query is also been submitted for foobar to
the backend. This is resulting in unnecessary query traffic, because
if there is no match for foo no match can be expected for foobar.
Is there a way to prevent subsquent queries from being submitted?

Thanks in advance!





[jQuery] autocomplete returning multiple identical values in dropdown

2010-01-17 Thread rumremix
The autocomplete plugin I obtained from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ is
working great aside from one significant problem: it is returning
multiple identical results in the dropdown.

Say I wish to search for all records that contain 'march' in the month
field and there are 12 such records that meet this criteria. I don't
want a dropdown to appear that dispays 'march' 12 times if I type 'm'
in the month field. I want only two values to appear exactly once
each: 'march', and 'may'.

It appears as though the code was written with the expectation that
the data will contain all unique values. Or am I doing something
wrong? I have been unable to see any option settings that control
this.

Thanks.


[jQuery] [autocomplete] Complex dependencies between fields

2010-01-14 Thread Perceive
Hi! I m use bassistance.de variant of this plugin and have next
problem.
I have dynamic number of pairs like Town - Street (users can add
it manually). It's id: adr1 - str1, adr2 - str2, ... . HTML:

input id=adr1 class=town sfield type=text /
input id=adrid1 type=hidden / // Town ID, taked from backend

input id=str1 class=street sfield type=text  /
input id=strid1 type=hidden / // Street ID, taked from backend

Street's autocomplete call looks like this:

$(input.street).autocomplete(/streetsbase/, {
delay:300,
minChars:2,
extraParams: {
wt:2,
townid: function() {  // Town ID from #adridN 
(N=1, 2, ...)
var num = 
$(this).attr('id').substring(3); // It's not work.
this != current input field
return $(#adrid + num).val();
}
   }
});

I want pass to townid correct ID of selected town (its number must
correspond to the number of current street field). But autocomplete()
method doesn't keep pointer to current input object. How I can solve
this problem?

sorry for my English


[jQuery] Autocomplete incompatible with certain struts-tiles-javascript apps

2010-01-14 Thread j...@verax
Hi jQuery guru,

I have an application based on struts and tiles. Validation is done by
javascript at a global level.
When I include my autocomplete code in my JSP page, the validation
(checkValidation()) malfunctions with a javascript error  - Object
does not support this property or method at the line

 if (CCRDerrorContainer.hasChildNodes()).

If I remove the autocomplete code from my JSP (business logic +
autocomplete libraries) , the validation works as designed. Details of
relevant code is provided below. Can anyone provide me with any clue
as to how to resolve this problem ?

==

---
My JSP file
---
%@ include file=../common/include.jsp %
link rel=stylesheet type=text/css  href=css/
jquery.autocomplete.css /
script type=text/javascript src=js/autocomplete/lib/jquery.js/
script
script type='text/javascript' src='js/autocomplete/
jquery.autocomplete.js'/script

script
var cols = []; // column mappings : 0=Last name, 
1=First Name,
2=Title, 3 = Employee ID
$().ready(function() {

$('input#employeeLastName').flushCache();

$(#employeeLastName).autocomplete(jsp/common/getData.jsp?
dataType=EmployeeName,{
minChars: 1,
max: 1000,
width: 400,
delay: 1000,
selectFirst: false,
autoFill: false,
cacheLength: 20,
matchContains: false,
matchSubset: true,
mustMatch: false,
matchCase: true,
formatItem: function(row, i, max) {
cols = row[0].split(%);
return i + / + max + :  + 
cols[0] + ,  + cols[1] +  ( +
cols[2] + );
},
formatMatch: function(row) {
cols = row[0].split(%);
return cols[0] + ,  + cols[1];
},
formatResult: function(row) {
cols = row[0].split(%);
return cols[0] + ,  + cols[1] 
+  ( + cols[2] + );
}
});
$(#employeeLastName).result(function(event, 
row, formatted) {
if (row) {
cols = row[0].split(%);
$(this).next().val(cols[3]);
}
});
});
/script
tiles:importAttribute name=task /
tiles:importAttribute name=action /
tiles:importAttribute name=displayAction /
tiles:importAttribute name=showArchived /

style type=text/css
@import ${pageContext.request.contextPath}/css/employee/select.css;
/style


h1
fmt:message key=employee.label.title.select /
/h1
hr /

div id=employeeSelect
tiles:insert definition=successMessages /
tiles:insert definition=failureMessages /
ccrd:errors /


html:form action=${action} method=post 

label for=employee id=employeeLbl 
fmt:message key=employee.text.selectEmployee /
span class=taskfmt:message key=${task} /:/span
/label

html:text styleId=employeeLastName property=lastName
size=100
maxlength=200
/html:text
html:hidden property=employeeId /
BR/ BR/
div class=buttons
html:submit property=submit 
styleId=submitButtonfmt:message
key=button.submit//html:submit
html:submit property=cancel 
styleId=cancelButtonfmt:message
key=button.cancel//html:submit
/div

/html:form
/div



Tiles-Defs extract
-

definition name=.default path=/jsp/layouts/template.jsp 
put name=header  value=/jsp/layouts/header.jsp /

[jQuery] Autocomplete selection blanks out input field

2010-01-11 Thread j...@verax
Hi,

I have been using the jquery autocomplete plug-in for some time now
and find it very useful. Lately I have come across the following
problem in one of my JSP pages.

The autocomplete suggestions are displayed and formatted properly. But
when I select the one that I want, the result briefly appears in the
input field and disappears. Simultaneously, the entered result
automatically triggers another jquery search.

The contents of my JSP page is given below. The same jquery code works
perfectly well with other JSPs. Can anyone help ?

--JSP
code

%@ include file=../common/include.jsp %
script
var cols = []; // column mappings : 0=Last name, 
1=First Name,
2=Title, 3 = Employee ID
$().ready(function() {
$('input#employeeLastName').flushCache();

$(#employeeLastName).autocomplete(jsp/common/getData.jsp?
dataType=EmployeeName,{
minChars: 1,
max: 1000,
width: 400,
delay: 1000,
selectFirst: false,
autoFill: false,
cacheLength: 20,
matchContains: false,
matchSubset: true,
mustMatch: true,
matchCase: true,
formatItem: function(row, i, max) {
cols = row[0].split(%);
return i + / + max + :  + 
cols[0] + ,  + cols[1] +  ( +
cols[2] + );
},
formatMatch: function(row) {
cols = row[0].split(%);
return cols[0] + ,  + cols[1];
},
formatResult: function(row) {
cols = row[0].split(%);
return cols[0] + ,  + cols[1] 
+  ( + cols[2] + );
}
});
$(#employeeLastName).result(function(event, 
row, formatted) {
if (row) {
cols = row[0].split(%);
$(this).next().val(cols[3]);
}
});
});
/script

tiles:importAttribute name=task /
tiles:importAttribute name=action /
tiles:importAttribute name=displayAction /
tiles:importAttribute name=showArchived /

style type=text/css
@import ${pageContext.request.contextPath}/css/employee/select.css;
/style


h1
fmt:message key=employee.label.title.select /
/h1
hr /

div id=employeeSelect
tiles:insert definition=successMessages /
tiles:insert definition=failureMessages /
ccrd:errors /

html:form action=${action} method=post 

label for=employee id=employeeLbl 
fmt:message key=employee.text.selectEmployee /
span class=taskfmt:message key=${task} /:/span
/label

html:text styleId=employeeLastName property=lastName
size=100
maxlength=200
/html:text
html:hidden property=employeeId /
BR/ BR/
div class=buttons
html:submit property=submit 
styleId=submitButtonfmt:message
key=button.submit//html:submit
html:submit property=cancel 
styleId=cancelButtonfmt:message
key=button.cancel//html:submit
/div

/html:form
/div

---end of jsp
code--




[jQuery] (autocomplete) how to keep the suggestion list when on blur

2010-01-07 Thread Angus
jQuery 1.3.2
jQuery Autocomplete plugin 1.1

I would like to
- keep the suggestion list when user click outside the text field.
- hide the suggestion list when user select item from the suggestion
list

I found a possible way, remove these lines of codes
if (!config.mouseDownOnSelect) {
hideResults();
}

Is there any better ways to achieve this ?



[jQuery] (autocomplete) Half of page disappears in IE7 when autocomplete list shows

2010-01-06 Thread Rune
Hi

I use autocomplete newest version on

http://www.kle-online.dk/stage

Things work great in FF and IE8 but in IE7 half of the page disappears
when the autocomplete list shows. Try to type benz in the search
field and problem should be easy to see.

Cheers,
Rune


RE: [jQuery] Autocomplete

2010-01-04 Thread amercer
Hi,
 
Thanks.
 
I still cannot pinpoint where I can handle the following problem, any
guidance greatly appreciated.
 
My data can have multiple words for one entry that must be
separated by a comma.
For example: array [ Item 1, Item 2, Item, value3... ];

When my clients type in the autocomplete field I need the comma to be
ignored, so for example:

If they type 'Item va' I need 'Item, value3' to be returned in the
autocomplete prompt list.  At the moment clients have to type 'Item,
va' to see 'Item, value3' in the autocomplete prompt list.  How can I
handle this.

Thanks again
 
Andrew

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of waseem sabjee
Sent: 02 January 2010 19:39
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Autocomplete


i would suggest you check out jQuery UI


On Sat, Jan 2, 2010 at 9:35 PM, AndrewM amer...@amwebright.com wrote:


Hi,

I am new to jQuery and have 2 questions:

I am using the bassistance.de jQuery plug-in.

1.  For speed I have created my Array of data to be searched client
side in a .js file as I have 25k + items.  In Firefox and IE8 the auto
prompt is very fast - however in for some clients it is not - for
example some using IE7. How can I speed up the load process?

2.  My data can have multiple words for one entry that must be
separated by a comma.
For example: array [ Item 1, Item 2, Item, value3... ];

When my clients type in the autocomplete field I need the comma to be
ignored, so for example:

If they type 'Item va' I need 'Item, value3' to be returned in the
autocomplete prompt list.  At the moment clients have to type 'Item,
va' to see 'Item, value3' in the autocomplete prompt list.  How can I
handle this.

Thanks for your help.

Andrew





Re: [jQuery] Autocomplete

2010-01-04 Thread Md. Ali Ahsan Rana
loop through all the items in array and use

item.replace(,,',)

this should be ok now...



-- 
http://ranacseruet.blogspot.com/


RE: [jQuery] Autocomplete

2010-01-04 Thread amercer
Hi, Thanks for your reply.
 
Can you please confirm that if I have a file called mydata.js that includes
the following:
 
var mydata = [
TownOne, County, Town Two, County, Town Three, County, TownFour,
County, 
];
 
that using item.replace(...) as suggested will for example ensure:
 
1.  Town Two, County will be shown in the prompt list if the user types Town
Two C or Town Two Co etc... 
OR TownFour, County will be shown in the prompt list if the user types
TownFour C or TownFour Co etc... 
 
Sorry to ask this extra question it must be the New Year my brain is still
in Christmas mode...
 
Thanks again
 
Andrew

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Md. Ali Ahsan Rana
Sent: 04 January 2010 08:33
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Autocomplete


loop through all the items in array and use

item.replace(,,',)

this should be ok now...



-- 
http://ranacseruet.blogspot.com/



Re: [jQuery] Autocomplete

2010-01-04 Thread Md. Ali Ahsan Rana
i just tried with this

cities = [TownOne, County, Town Two, County, Town Three, County,
TownFour, County];
 $(#suggest1).autocomplete(cities);

its working correctly. The problem you said, event doesn't appear. So, can
you explain what you r using and what is happening actually?

Regards


ranacseruet http://ranacseruet.blogspot.com


Re: [jQuery] Autocomplete

2010-01-04 Thread Md. Ali Ahsan Rana
If you want to match ignoring the comma(may be this is what you want), then
you have to pass some extra parameters and some more suggestion will show up
besides the expected..

$(#suggest1).focus().autocomplete(cities,
{multiple: true,
 multipleSeparator: ,
 matchContains:true}
);


-- 
http://ranacseruet.blogspot.com/


RE: [jQuery] Autocomplete

2010-01-04 Thread amercer
Thanks

  _  

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Md. Ali Ahsan Rana
Sent: 04 January 2010 12:06
To: jquery-en@googlegroups.com
Subject: Re: [jQuery] Autocomplete


If you want to match ignoring the comma(may be this is what you want), then
you have to pass some extra parameters and some more suggestion will show up
besides the expected..

$(#suggest1).focus().autocomplete(cities,
{multiple: true,
 multipleSeparator: ,
 matchContains:true}
);


-- 
http://ranacseruet.blogspot.com/



[jQuery] Autocomplete

2010-01-02 Thread AndrewM
Hi,

I am new to jQuery and have 2 questions:

I am using the bassistance.de jQuery plug-in.

1.  For speed I have created my Array of data to be searched client
side in a .js file as I have 25k + items.  In Firefox and IE8 the auto
prompt is very fast - however in for some clients it is not - for
example some using IE7. How can I speed up the load process?

2.  My data can have multiple words for one entry that must be
separated by a comma.
For example: array [ Item 1, Item 2, Item, value3... ];

When my clients type in the autocomplete field I need the comma to be
ignored, so for example:

If they type 'Item va' I need 'Item, value3' to be returned in the
autocomplete prompt list.  At the moment clients have to type 'Item,
va' to see 'Item, value3' in the autocomplete prompt list.  How can I
handle this.

Thanks for your help.

Andrew


Re: [jQuery] Autocomplete

2010-01-02 Thread waseem sabjee
i would suggest you check out jQuery UI

On Sat, Jan 2, 2010 at 9:35 PM, AndrewM amer...@amwebright.com wrote:

 Hi,

 I am new to jQuery and have 2 questions:

 I am using the bassistance.de jQuery plug-in.

 1.  For speed I have created my Array of data to be searched client
 side in a .js file as I have 25k + items.  In Firefox and IE8 the auto
 prompt is very fast - however in for some clients it is not - for
 example some using IE7. How can I speed up the load process?

 2.  My data can have multiple words for one entry that must be
 separated by a comma.
 For example: array [ Item 1, Item 2, Item, value3... ];

 When my clients type in the autocomplete field I need the comma to be
 ignored, so for example:

 If they type 'Item va' I need 'Item, value3' to be returned in the
 autocomplete prompt list.  At the moment clients have to type 'Item,
 va' to see 'Item, value3' in the autocomplete prompt list.  How can I
 handle this.

 Thanks for your help.

 Andrew



[jQuery] autocomplete plugin not working in firefox

2009-12-30 Thread mary ann
I'm using the autocomplete plugin.  The following script works in IE,
but doesn't work in Firefox.  It doesn't appear  that these are even
being triggered.  So when the page displays in Firefox, the
searchStudents textbox has no autocomplete associated with it.

$(document).ready(function() {
$('#searchStudents').autocomplete('%=Url.Action(Students,
Student)%', {
dataType: 'json',
parse: function(data) {
var rows = new Array();
for (var i = 0; i  data.length; i++) {
rows[i] = { data: data[i], value: data
[i].LastName, result: data[i].LastName };
}
return rows;
},
formatItem: function(row, i, n) {
return row.LastName + ' - ' + row.UserId;
},
width: 300,
mustMatch: false,
limit: 10
});

$('#searchStudents').result(function(event, data, formatted) {
if (data)
$(this).parent().next().find(input).val(data
[UserId]);
$('#Students).append('option value=' + data[UserId] +
'' + data[LastName] + '/option ');
});

$('#deleteStudents').click(function() {
$('#Students :selected').each(function(i, selected) {
$(selected).remove();
});
});
});


[jQuery] jQuery AutoComplete plugin url problem

2009-12-25 Thread wenyus
I am using a jQuery AutoComplete plugin.
My code is not working:

var jj=$(#region_area).val();
$(#code_area).autocomplete( codearea.php?id=+jj , {autoFill:
true,matchContains: true});

This also not working:

var jj=$(#region_area).val();
jj=codearea.php?id=+jj;
$(#code_area).autocomplete( jj , {autoFill: true,matchContains:
true});

Help me pls.. and sorry for my bad english language.

Thank You


[jQuery] [AUTOCOMPLETE]

2009-12-23 Thread Jake Moon
Is it possible to open the select list on focus?

Best regards,

Jake Moon


[jQuery] Autocomplete Multiple

2009-12-22 Thread avagarwal
Hi,

I have set the autocomplete for multiple, as shown below. When I use
the tab to select an entry it works fine, but you try using the mouse
then it does not work correctly. Any suggestion on what may be the
issue (using IE7) -

$('#textbox').autocomplete('url',{
   minChars:1,
   max:200,
   width:300,
   scrollHeight:200,
   matchContains:false,
   autoFill:false,
   selectFirst:true,
   mustMatch:false,
   multiple:true,
   delay:250,
   formatItem:function(row, i, max) {
return row[0];
 }
,
   formatResult:function(row){
return row[0];
}

   });
   });

Thanks in Advance

Anurag




[jQuery] jquery autocomplete should link to page

2009-12-22 Thread Axel
Hello Everbody,

i´m using jquery autocomplete on my site. In row [1] i put values
for building urls - and when I klick on it I want to move to the URL -
and not to autocomplete the input field (what is the originally
purpose of the autocomplete). So I want the suggested Items to have a
normal a href-behavior.


function formatItem(row) {
return a href=' + row[1] + '+ row[0] + /a;
}

Hoping someone has an easy solution.


Axel


[jQuery] Re: jquery autocomplete should link to page

2009-12-22 Thread MorningZ
function formatItem(row) {
  window.location = row[1]; //Send the user to URL 'row[1]'
}


On Dec 22, 7:33 am, Axel seemann-ka...@web.de wrote:
 Hello Everbody,

 i´m using jquery autocomplete on my site. In row [1] i put values
 for building urls - and when I klick on it I want to move to the URL -
 and not to autocomplete the input field (what is the originally
 purpose of the autocomplete). So I want the suggested Items to have a
 normal a href-behavior.

 function formatItem(row) {
         return a href=' + row[1] + '+ row[0] + /a;

 }

 Hoping someone has an easy solution.

 Axel


[jQuery] Re: jquery autocomplete should link to page

2009-12-22 Thread Axel
Thank you very much. This is working.

But it should happen after klicking on a result and not while typing.
Now I try to find the position in the code where the clicking event
is written and I can insert this. I think its somewhere in the
jquery.autocomplete.js .

Thank you!





On 22 Dez., 15:55, MorningZ morni...@gmail.com wrote:
 function formatItem(row) {
       window.location = row[1]; //Send the user to URL 'row[1]'

 }

 On Dec 22, 7:33 am, Axel seemann-ka...@web.de wrote:

  Hello Everbody,

  i´m using jquery autocomplete on my site. In row [1] i put values
  for building urls - and when I klick on it I want to move to the URL -
  and not to autocomplete the input field (what is the originally
  purpose of the autocomplete). So I want the suggested Items to have a
  normal a href-behavior.

  function formatItem(row) {
          return a href=' + row[1] + '+ row[0] + /a;

  }

  Hoping someone has an easy solution.

  Axel


[jQuery] [autocomplete] Slide up instead of drop down?

2009-12-21 Thread Ed
Greetings, all. The autocomplete plugin is excellent! I'm looking to
have a text input field on the bottom instead of the top of the page,
however, and would thus like results to appear above the box instead
of below. Anyone have a quick tip on how to change this?

Much obliged,
E


[jQuery] [autocomplete]

2009-12-19 Thread nKognito
In your autocomplete plugin example (tags list): when a user types
some word and then select the right one from the suggested list by
keyboard - everything ok, BUT when he wants to select an option by
mouse - there is a big problem - the input field recieves th wrong
value. I have similar problem on my web site. What's the cure/ Thank
you


[jQuery] autocomplete: extra fields

2009-12-18 Thread Simon Matthews
I have a number of fields in a grid which are all using auto
complete.  I want the extraParams function to be able to work out
which field I am in so that I can return a differently filtered list.
I don't seem to have access to the input variable?  Any clues?

Thanks

Simon


[jQuery] autocomplete character replace on callback

2009-12-15 Thread led
I need help with this plugin autocomplete.
with results  i also show how many , ex:

mexico (5)
los angeles (4)

How can i make the selection without the associated number.

ex: mexico
  los angeles

change event does'nt work.


[jQuery] [autocomplete] How to stop the script after submit?

2009-12-13 Thread Wonderm00n
I'm using the autocomplete plugin (http://bassistance.de/jquery-
plugins/jquery-plugin-autocomplete/) and sometimes I press enter /
submit the form (which uses ajax, so the page does not change) and the
autocomplete fires up AFTER this, so the user already entered the
search term, is already seeing the results but the autocomplete list
appears after...

Is there any way to stop the autocomplete script, preventing him to
appear?


[jQuery] autocomplete - how to open dropdown with function

2009-12-11 Thread alex_mass
I'm using jQuery plugin: Autocomplete, in a field id=inputsearch.

The question, is how is it possible to open the dropdown
programmatically frmo javascript in the page.

thanks for the help
Alex


   $(#inputsearch).autocomplete(${topicList}, {
   formatItem: function(item) {
 return item.display;
   },
   minChars:0
 })


[jQuery] (autocomplete) Full value is typed in, not clicked, then focus goes

2009-12-10 Thread Kendric Beachey
I have a form where you use the autocomplete box to choose a value.
As long as you mouse-click the value or TAB to another field, it seems
like everything works fine.  But if you fully type the entire value of
something in the list and then click on another field and start typing
over there, it seems like the value in the autocomplete field just
isn't really picked up.  My required field logic kicks in as if you
left it blank.

I am admittedly on autocomplete version 1.0.1 so if this is something
that is fixed in a later version, just let me know...
--
Kendric Beachey


[jQuery] [autocomplete] extraParams with

2009-12-07 Thread stoffus
I can't seem to find an answer to this question anywhere.

When using extraParams, is it possible to refer to the element
triggering the autocompleter?

For example;

$(input.element).autocompleter(ajax.php, {
extraParams: { $(this).parent(form).attr(name) }
}


[jQuery] (autocomplete) remove hidden variable on bad input

2009-12-03 Thread dgm
How would one go about removing a hidden variable when the
autocomplete is left invalid?

I tried:

$(.autocomplete_search).result(function(event, data, formatted) {
if (data)
$(this).next().val(data[1]);
else
  $(this).next().val('');
});


But I think result doesn't get fired if the textbox loses focus
without selecting a valid value.



[jQuery] [autocomplete] FIX: Cache using term + extraParams

2009-12-02 Thread Gabbit
Hi all,

i have made a change to autocomplete code, because cache handling
should include extraParams in cache term. I thought this could be
interesting for some of you, so here is the code snippet that should
replace existing function request in autocomplete.js :


function request(term, success, failure) {
if (!options.matchCase)
term = term.toLowerCase();
//FIX: extraParams should be included in cacheTerm
var cacheTerm = term;
var extraParams = {
timestamp: +new Date()
};
$.each(options.extraParams, function(key, param) {
 var extP = typeof param == function ? 
param() : param;
 extraParams[key] = extP;
 cacheTerm = cacheTerm + _ + key + : +extP;
});


var data = cache.load(cacheTerm);
// recieve the cached data
if (data  data.length) {
success(term, data);
// if an AJAX url has been supplied, try loading the data now
} else if( (typeof options.url == string)  
(options.url.length 
0) ){



$.ajax({
// try to leverage ajaxQueue plugin to abort 
previous requests
mode: abort,
// limit abortion to this input
port: autocomplete + input.name,
dataType: options.dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
}, extraParams),
success: function(data) {
var parsed = options.parse  
options.parse(data) || parse(data);
cache.add(cacheTerm, parsed);
success(term, parsed);
}
});
} else {
// if we have a failure, we need to empty the list -- 
this prevents
the the [TAB] key from selecting the last successful match
select.emptyList();
failure(term);
}
};



[jQuery] [autocomplete] Parse JSON ajax request

2009-12-02 Thread Gabbit
Hi all,

here is the code i use to parse an ajax request call as JSON string as
it is done for local data.

I think this should be the default behavior, but autocomplete uses a
| separated String...

parse: function(data){
var objArray = eval(( + data + ));
var parsed = [];
for (var i=0; i  objArray.length; i++) 
{
rawValue = objArray[i];
var value = 
this.formatMatch(rawValue, i+1, objArray.length);

parsed[parsed.length] = {
data: rawValue,
value: value,
result: 
this.formatResult  this.formatResult(rawValue) ||
value
}

}
return parsed;

}
Hope this helps.


[jQuery] autocomplete plugin : detecting initial value problem, or how to programatically set the value

2009-11-27 Thread j.alkjaer
Hi there,
We are using the rather nifty autocomplete plugin from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
but have run into a problem

$(#autocomplete).result(
function(event, data, formatted) {
  alert(formatted)
}).autocomplete([c++, java, php, coldfusion, javascript,
asp], {})

This works as expected but we really would like to create the input
element as
input id=autocomplete type=text value=java  and automatically
have the result listner be invoked on creation of the autocomplete
(why we bind the result listener prior to constructing the plugin) .

We can use the search() function, but for some reason the plugin code
stalls 25 millis before being completely initialized ( line 514 in v.
1.1)
We can of course wait 26 millis before calling search, but in our
context that is causing some other trouble. (ie we would have to delay
a whole slew of other stuff as well)

So the question is : Is there a particular reason why the list is not
populated synchronusly?

You can see a live example at http://jsbin.com/oweri
It doesn't call search atm, but you can add that yourself :

setTimeout(function() { $(#autocomplete).search()},26)

Thanks in advance
Johannes and Jens


[jQuery] Autocomplete IE scrollbar not appearing

2009-11-25 Thread zLan
Hey,

I implemented the jQuery Autocomplete plugin and when I do a search
that returns a lot of items I want a vertical scrollbar. I added the
scroll: true, and scrollHeight but the scroll bar doesn't want to work
in IE (works in FF and Chrome perfectly).

This is the jQuery I have for the plugin:

$(document).ready(function(){
$(#Search).autocomplete('Search.txt', {
width: 350,
minChars:3,
matchMatch: true,
scroll: true,
scrollHeight: 220,
delay: 500
});
});

I also played with the CSS (jquery.autocopmlete.css) by adding
overflow-y: scroll; and height

.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
/*overflow: hidden;*/
overflow-y: scroll;
height: 220px;
z-index: 9;
}

This got the scrollbar to appear in IE, but whenever I clicked on the
scrollbar it went away because it lost focus or something.

Is there anyway I can get the scrollbar working in IE browsers or some
kind of workaround solution?

Thanks,
zLan


[jQuery] [autocomplete] how to shorten the dropdown??

2009-11-23 Thread GoogleAccount
i am trying to shorten the result div. how do you do this. i want it
to be the same size as the input box, not 3 times as big. :-)


[jQuery] jquery-autocomplete encoding character issue

2009-11-23 Thread Stephane
Hello,

I have a problem with the encoding / decoding of Norwegian characters
namely Ø turned into Ã

This happens with the jquery-autocomplete plugin and not with the
jquery load() method.

That is, this :

$(totalAvtaleNavn).load(suggestTotalAvtaleUrl, {q:TTTøøre});

works fine. Always.

But this :

$(#miID).autocomplete(myUrl, {
minChars: 2,
matchContains: 1,
formatItem: function(row) {
  return(row[2]);
},
formatResult: function(row) {
  return(row[1]);
}
});

works only when run from within a Grails run-app on my local machine,
and does not work when run from a test server with Tomcat.

My guess is that the jquery-autocomplete plugin is sensitive to some
environment affecting its handling of utf-8 encoding and decoding.

Any idea ?


[jQuery] Jquery autocomplete case

2009-11-21 Thread Julius
Dear all, 

I'm new in jquery. I want to ask about, how to validate value on auto complete  
plug in. The value that entered by user, must match with the value in the 
autocomplete array. How to do that in jquery? May someone give a solution. Thx


Sent from my BlackBerry®
powered by Sinyal Kuat INDOSAT

[jQuery] Autocomplete plugin not working with $.ajax?

2009-11-17 Thread Teddy Hong
here the code
// if I type like below code, auto complete it's show..
$('#edit-submitted-order-no').autocomplete([one,two,three]);


// but if I type like below code, auto complete not showing... why?
anybody can help?... thanks
$.ajax({
type: POST,
url: test.php,
success: function(msg){
//alert(msg); return [one,two,three]
$('#edit-submitted-order-no').autocomplete(msg);
}
});


[jQuery] Autocomplete widget with similar functionality of script.aculo.us

2009-11-16 Thread Henrik Lied
Hi there!

I know there's a ton of different autocomplete plugins out there, but
I still haven't found a single one that provides a great feature found
in scrip.aculo.us' autocomplete widget: Adding class=informal to an
element makes it non-selectable.

This is great for e.g. categorizing your search results, like it's
done on e.g. Apple.com (search bar, top right corner).

Is there a way to mimic this functionality in any of the current
jQuery autocomplete plugins?

Thanks!
- Henrik Lied


[jQuery] autocomplete remote data backspace behavior

2009-11-13 Thread Jas
In the demo http://view.jquery.com/trunk/plugins/autocomplete/demo/
with Multiple Cities and Multiple birds there seems to be a difference
in behavior when removing or backspacing the last entry.
Is it possible to make the remote one act like the local one, where
pressing the backspace removes the whole entry rather than each
letter?

Thanks


[jQuery] Autocomplete , inseting text

2009-11-12 Thread Inbar, Shai
This is a newbie question.

I want to use the jQuery autocomplete for injecting text in the middle of 
another text, inside a text area.
I mean, I have a textarea that may already contain some text. I want to set the 
cursor anywhere in that text and start typing. The autocomplete box pops up and 
shows me the available options that match what I started typing. When I select 
one of the options, it  is inserted at the initial cursor position.

Can I do that with the jQuery autocomplete?

Thanks



[jQuery] autocomplete div don't disappear after move scroll

2009-11-12 Thread danielecr
try in http://www.confestetica.it/estetica/ (on the right)
1. typed some chars
2. move scrollbar with mouse
3. click elsewhere
4. div do not disappear as expected (at least by me)

I loaded bgiframe plugin, there is something I have to do to make it
behave as I expect?


Daniele.


Re: [jQuery] autocomplete div don't disappear after move scroll

2009-11-12 Thread Andrei Eftimie
Works fine in FF 3.5.5

On Thu, Nov 12, 2009 at 6:36 PM, danielecr daniele...@gmail.com wrote:
 try in http://www.confestetica.it/estetica/ (on the right)
 1. typed some chars
 2. move scrollbar with mouse
 3. click elsewhere
 4. div do not disappear as expected (at least by me)

 I loaded bgiframe plugin, there is something I have to do to make it
 behave as I expect?


 Daniele.




-- 
Andrei Eftimie
http://eftimie.com
+40 758 833 281

Punct
http://designpunct.ro


[jQuery] Autocomplete - Is there a way?

2009-11-08 Thread cdukes77
I'm using Autocomplete in a search field to reference and load a
record from a database ... it's working perfectly, thank-you for
making this UI concept so easy to accomplish ...

Is there a way to have a special item return in the autocomplete
list regardless of what the user types ... In other words something
like ...

Imagine a Movie database -- with a UI that allows you to type the
movie name in an autocomplete enabled text area ... as you type the
name ... possible matches are displayed and available for selection
(so far, exactly as you would expect autocomplete to work)  ... but as
you type, and the list continuously narrows, the user finds that the
movie is not in the list ...

What I'm trying to figure out how to do - is to have an Add New
option in the Autocomplete list that shows (at the top or bottom of
the autocomplete list) as a selectable option, regardless of what the
user is searching for.

I can obviously have an Add New option when the user types an
a ... what I would like is for the Add New selectable option to
show up in all circumstances.

Thanks again,
Chip


[jQuery] jquery autocomplete - textbox : display none

2009-11-05 Thread senthil kumar pillai
Hi,

I need a text box with autocomplete feature. But, the text box is not
displayed when page loads initially. Based, upon some selection in a
regular drop down, this text box will appear. When I start typing the
letters, I should get the autocomplete drop down.

I use jquery auto-complete-4.1 version, the problem I am facing is,
autocomplete drop down shown does not have enough width (only 6px).

Width is good with other text boxes which are displayed when page
loads.

Any help would be really appreciated.

Thanks,
PSK


[jQuery] autocomplete: unautocomplete not working v1.1

2009-11-03 Thread vdhant
Hi guys
I am using v1.1 and the unautocomplete is not working correctly for
me. The unautocomplete partially works... as in it doesn't show the
user anything (although the loading style is changed) but it still
triggers the ajax call and just doesn't display the results... The
point being that the autocomplete is still running in the background.

This is how I'm wiring it up (the idea being that I can autocomplete
the localities for countries that are known):

if (_this._$CountrySelectScope.val() ==
_this.Settings.LocalCountry) {
_this._$LocalityScope.unautocomplete().autocomplete
(_this.Settings.LocalityUrl, {
dataType : 'json',
contentType : 'application/json; charset=utf-8',
type : 'POST',
stringifyAjaxData : true,
matchContains : true,
selectFirst : false,
width : 300,
parse : function(result, options) {
if (result != null) {
var data = result.Data.LocationLocality;
var parsed = [];
for (var i=0; i  data.length; i++)
parsed[parsed.length] = { data: data[i],
value: data[i].Locality, result: options.formatResult(data[i], data
[i].Locality) };
return parsed;
}
return [];
},
formatItem : function(row, i, max) {
return row.Locality + ,  + row.State;
},
formatMatch : function(row, i, max) {
return row.Locality;
},
formatResult : function(row) {
return row.Locality;
}
}).result(function(event, data, formatted) {
//Auto select state
_this._$StateSelectScope.val(data.State);
});
}
else
_this._$LocalityScope.unautocomplete();

Any ideas on what is going wrong here, why autocomplete isn't
unbinding correctly?

Cheers
Anthony


[jQuery] Autocomplete: highlight is not working if the result contains escaped html characters

2009-11-02 Thread varun shankar
I have textfield where I am using the autocomplete.
I want to allow users to use html in the input .
And while outputting the result I am escaping the html.

Now there is an issue if I use the default highlight feature of the
autocomplete plugin.

If the result contains escaped html characters, the highlight is not
working properly. Also the characters are not displayed properly in
the list.

Ex:  If the response contains lt; test gt;

Then
1. In the list it is appearing as  ; test ;
2. Highlight is not working.

I found the issue is with the options.highlight() function in the
plugin. It is using RegExp to match and highlight the result. This is
buggy.
Any fix for this ?


[jQuery] autocomplete

2009-10-30 Thread MC
I'm trying to use autocomplete on a dialog windows that has a editing
form for the user to change data previously saved so every
autocomplete input has data that can be change. The problem is when i
do change a value and try to update an input with part of the data
returned by the autocomplete script.

This is what i am doing but is not working

$.ajax({
 type: POST,
 url: contabilidad/totalAsientos.php,
 data: idasiento=+id,
 success: function(respuesta){
 var totallineas = parseInt
(respuesta);
for(var j=0; jtotallineas; j++){
   $
(#codigocuenta+j).autocomplete(contabilidad/
autocompleteasiento.php ,{
minChars: 1,
width: 400,
max: 20,
autoFill:
true
}).result(function(event,
data, formatted) {
if (data!=){
$
(#codigocuenta+j).val(data[1]);
$
(#denominacion+j).val(data[2]);
}
});

} //endfor
}
})

Is there a way to do what a want to do?


[jQuery] [autocomplete] IE7 bugs

2009-10-27 Thread jmunning

I've noticed some strange behavior in IE7 for the bassistance
autocomplete plugin.

1.  This bug can be seen on the demo page here:

Type something into the Multiple Birds (remote) field and select one
of the autocomplete choices.  Type a couple more letters so the drop
down appears again. Hold shift while selecting a second option from
the autocomplete drop down and everything below that input box
disappears.  I've noticed this behavior on my site also.

Can someone verify that this is happening for them also?

2.  Even though I have the option multiple set to true, it is
replacing my first selection every time I select an additional item
from the autocomplete drop down.  It also will not add a return as a
line separator even though I have the option:

multipleSeparator: \n

You can see the behavior here:  http://www.xyggy.com

Again these bugs are only in IE7

Any help would be appreciated.  Thanks.


[jQuery] [Autocomplete] - Issue with DOCTYPE?

2009-10-27 Thread luisfigo

Hi guys,

Currently I'm using this version of autocomplete plugin
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ for
some of my php files.

I found an issue with the autocomplete dropdown that it showed all the
html tags as results instead of the data from the database. Something
like...!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;...Was
wondering what went wrong here since I've it implemented for another
web page and it worked absolutely fine.

In http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/, I
also found similar post about the issue by HESHAM.

Any advice? Thanks


[jQuery] Autocomplete

2009-10-26 Thread mik...@produktion203.se

Hi,

I use jQuery's Autocomplete plugin on my website.

What I need help with is sorting the list that appears. I want it to
have the same sort that I have in the array where all the options are
available.

Best regards,
Mikael


[jQuery] [autocomplete] Using a \n (new line) as the multipleSeparator in Internet Explorer does not work

2009-10-22 Thread Gabe

I've been getting some buggy behavior with IE7 when using a new line
character as the multipleSeparator.  Here is my sample code:

textarea name=search[movies] rows=4 cols=20
id=search_movies/textarea
$('#search_movies').autocomplete(
'ajax_movie_autocomplete', {
mustMatch: true,
multiple: true,
multipleSeparator: \n
});

Firefox and Safari work great.  In IE, the first entry works fine, but
the cursor stays on the same line.  When you hit a character for your
second entry, the cursor drops down a line and starts displaying the
auto-complete options for your new text appropriately.  However, if
you hit enter, it fails to autocomplete at all and just drops down
to a new line.  If you instead select the option with your mouse
instead of hitting enter, it changes the first line instead of the
line you're actually on.

I receive the same behavior if I set multipleSeparator: \r\n .

Also, \r\n is completely broken Firefox and Safari.  The first entry
works fine, but the second entry completely wipes out everything typed
into the textarea so far.  If anyone has a solution for IE, I'd love
it worked on the \n form, as I'd rather not browser sniff to
determine the separator.


[jQuery] [autocomplete]

2009-10-21 Thread i.cheong

Great plugin. Very flexible and easy to implement.
I'm not sure if this is a bug or I'm doing something wrong but here
goes.

My list of items are:
Grenada, St Georges
France, Nuits Saint-Georges
Canada, Georgetown
Georgia, Tbilisi

is set to default and the cacheLength is at default too.

Now, I am trying to find the Canada, Georgetown entry.

so I start typing geo and it shows me that whole list.
when I pause and type r, it shows me Georgia, Tbilisi and not the
rest
when I just type geor, it will show me the whole list

basically, what's happening is if I wait for the delay to finish, it
goes and does the ajax call and it will show me all the results.
if I pause and wait for the delay to expire then continue typing, it
will only show me results that match my keyword at the beginning only.

any ideas?
Thanks


[jQuery] Autocomplete and Fancybox

2009-10-20 Thread Ramalho

Hi to all,

I'm trying to work out how to integrate a result comming from a
autocomplete to be showed in a fancybox, someone has some idea.


[jQuery] Autocomplete and enter key event

2009-10-15 Thread Benjamin


Hi,

I have some problem with autocomplete plugin.

When selecting option into autocomplete drop down list, focus stays on
input field. So when Enter key is hit to select option, event is
catched by the input field. In my case that's a problem because I
submit form on enter key event and a selection into autocomplete
options list submits immediatly the form :)

Because of the focus staying on input field while navigating into
autocomplete drop down list, stopPropagation() can't help me.

Any idea ? I'm stuck with that stuff.


Thanks (and sorry for my bad ass english :p)

Cya,

Benjamin.



[jQuery] jquery autocomplete plugin - hardcoded overflow: auto

2009-10-14 Thread Rick Strahl


I'm taking a look at the jQuery autocomplete plugin and it works great
for the most part except that it's generating scrollbars on both sides
of the drop down list.

Unfortunately this can't be overridden (AFAIK) via the stylesheet
provided because the code apparently hard codes the overflow: auto
style in the plug-in's code.

It's this code in the show function:

if(options.scroll) {
list.scrollTop(0);
list.css({
maxHeight: options.scrollHeight,
overflow: 'auto'
});

This effectively overrides any settings in the style sheet.

I've removed the overflow from the above code and then used the style
sheet instead, but is this something that could be done to the base
code in a future update. The explicit hard coding seems entirely
unnecessary since the styling can take care of this.

+++ Rick ---


[jQuery] Autocomplete not working in Firefox

2009-10-14 Thread vrodg

I can get Jquery Autocomplete to work in all browsers but Firefox.
The function correctly queries the data and creates the results div/
list, but it's not setting the style: display to show or block, it's
remaining at none, the default state. Firebug is not showing me any
errors, as far as its concerned it's running just fine.  Any thoughts?




[jQuery] [autocomplete] Callback for selected match

2009-10-14 Thread eka

Hi

Is there anyway to pass a callback to the options to be called when an
option is selected?

Regards

Eka


[jQuery] [Autocomplete] modify URL at runtime

2009-10-13 Thread graphicsxp

Hi,

I'm using the autocomplete plugin like that in the ready() event :


  $(#ctl00_body_txtSearch).autocomplete(Autocomplete_GetArts.ashx)
.setOptions({
  width: 220px
});

However I need to be able to change the URL (to add a bunch of query
parameters) based on the values of some radio buttons and select
boxes, which should be passed to the server page.

How can I modify the URL before the AJAX call is made ? Is there an
event I can use ?

Thanks


[jQuery] Autocomplete not working only in Firefox

2009-10-13 Thread vrodg

I've recently installed an formated the Autocomplete script into my
page and it works beautifully for IE, Saf,  Chrome, but the results
drop down won't appear in Firefox, on both Mac and PC.  I've had
another use it check it in a different state to confirm.

The PC version of Firefox is 3.5.3.  Firebug is't registering the key
events to debug it there.  Is there an option I'm missing?

basic script.

$().ready(function() {

$(#artistText).autocomplete(artist,{
matchContains: true,
minChars: 1
});

});


[jQuery] [autocomplete] Incorrect selection on mouse click in IE7+

2009-10-09 Thread vsc

For clarity, I have modified the code in the demo application to
demonstrate the bug.
1. Please download code from 
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
and place attached AutosuggestBug.html in demo folder.
2. Launch AutosuggestBug.html in Internet Explorer (I used version
IE7).
2. In Multiple Cities (local) text area enter letter a (Observe
autosuggest list displayed with focus on Aberdeen)
3. Press enter (to add Aberdeen)
4. Enter letter a again (Observe autosuggest list displayed with
focus on Aberdeen)
5. Select Ada (the second entry in auto suggest list) with a mouse
click.

Expected Result:
The Multiple Cities (local) text area should be populated with
Aberdeen, Ada (as is the case with Firefox).

Actual Result:
In IE, the Multiple Cities (local) text area is populated with Ada,
a.

Additional information:
On debugging the code, the problem seems to be in the following
snippet of code:

selectCurrent() {
...
if ( options.multiple ) {
var words = trimWords($input.val());
if ( words.length  1 ) {
var seperator = options.multipleSeparator.length;
var cursorAt = $(input).selection().start;
...
if (cursorAt = progress) {
wordAt = i;
return false;
}
...
});
words[wordAt] = v;
...
v = words.join( options.multipleSeparator );
}
v += options.multipleSeparator;
}

$input.val(v);
..
}

The problem occurs primarily at:
var cursorAt = $(input).selection().start;
Here, the variable, 'cursorAt' holds an incorrect value of -1 (return
value from the selection() function) when selection happens via mouse
click in IE.

NOTE: This problem happens only in IE.

Has somebody encountered this problem and/or have a recommended
solution to this problem?
Any help will be appreciated.

Regards,
Charanya



Attachment:
AutosuggestBug.html

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/
TR/html4/strict.dtd
html
head
titlejQuery Autocomplete Plugin/title
script type=text/javascript src=../lib/jquery.js/script
script type='text/javascript' src='../lib/jquery.bgiframe.min.js'/
script
script type='text/javascript' src='../lib/jquery.ajaxQueue.js'/
script
script type='text/javascript' src='../lib/thickbox-compressed.js'/
script
script type='text/javascript' src='../jquery.autocomplete.js'/
script
script type='text/javascript' src='localdata.js'/script

link rel=stylesheet type=text/css href=main.css /
link rel=stylesheet type=text/css href=../
jquery.autocomplete.css /
link rel=stylesheet type=text/css href=../lib/thickbox.css /

script type=text/javascript
$().ready(function() {
$(#suggest3).autocomplete(cities, {
multiple: true,
matchContains: true,
autoFill: false
});

});


/script

/head

body

div id=content
form autocomplete=off

p
labelMultiple Cities (local):/label

textarea id='suggest3' cols='40' rows='3'/textarea
input type=button value=Get Value /
/p

/form
/div
/body
/html


[jQuery] [autocomplete] from bassistance: clicking outside the autocomplete does not remove AC

2009-10-09 Thread Bernie

Hello all,
For some reason, clicking to the left or right of the autocompletion
dropdown doesn't remove the drop-down in IE7 for me, but it works on
the demo site...anyone else experience this? Is it some kind of
formatting bug I should be looking out for?
Bernie


[jQuery] [autocomplete] Pressing Enter On Non-Matched Substring When firstResult:false does not hide the Autocompletion List.

2009-10-09 Thread msordo

Hi all.

My autocompletion code is:

$(#suggest).autocomplete(tags, {selectFirst: false, multiple: true,
multipleSeparator: ,,});

When I start typing in my text field, for instance Nou, the
autocompletion gives me Nouvelle, Nouveau... But what I want actually
is to search for Nou. So I press enter, my search engine returns
some results, but the autocompletion list is still there, unless I
press Esc.  Isn't there any other option to disable/hide the
autocompletion list when Enter is pressed (out of the autocompletion
list, of course)?

Thanks a lot


[jQuery] AutoComplete Sends Null To Server Side Function

2009-10-08 Thread Mark Phillips

Hi,

I'm using the AutoComplete Plugin with ASP.NET MVC.  For some reason
the client side input value is NULL when it reaches the Server method.

Any suggestions would be appreciated.

Thanks,
Mark


[jQuery] autocomplete with tooltip

2009-10-08 Thread Joe

Hi Folks,

it is possible to combined the autocompleter with the tooltip plugin?
I must call$(#tooltip).tooltip({ track: true, showURL: false });
to acticate the tooltip BUT i dont have the onComplete or onReady
Event on the autocompleter.  ;(

Or is the the wrong way ?

Thx
Joe


[jQuery] autocomplete question

2009-10-07 Thread Bjarki

I am looking at the auto-complete demo page, (
http://view.jquery.com/trunk/plugins/autocomplete/demo/ ) on the demo
of remote images.
the Javascript for that is
$(#imageSearch).autocomplete(images.php, {
width: 320,
max: 4,
highlight: false,
scroll: true,
scrollHeight: 300,
formatItem: function(data, i, n, value) {
return img src='images/ + value + '/  + 
value.split(.)[0];
},
formatResult: function(data, value) {
return value.split(.)[0];
}
});

my problem is that when I try to implement this. it will only search
for the data that is first in the string. so if  I have a span +
data.N /span  I have to type in span to see any results, how to I
configure this to just match the data.N ?

function getEmpSuccess(data){
eval(empColl =  + data + ;);
$(input[id$='query']).autocomplete(empColl[E], {
formatItem: function(data) {

var rts = data.N;
rts +='div class=color' + 
data.W + 'nbsp;/divbr /';
rts += sub + data.S + 
/sub;

return rts;
},
formatResult: function(item, value) {
return item.N;
},
selectFirst: false,
max: 5
});
}


[jQuery] (autocomplete)

2009-10-07 Thread Alberto

I'm trying to use the plugin with generated json, but the parse isn't
going very well... My json, that is being produced is something like
that:
[ { id: 9887, nome: Salvador, estado: BA }, { id:
9890, nome: Salvaterra, estado: PA }, { id: 9888,
nome: Salvador das Missões, estado: RS }, { id: 9889,
nome: Salvador do Sul, estado: RS } ]. Is there something
wrong? i tried to pass my formarItem function but did not work, the
plugin is not parsing my json... I looked for some reason into source
code but i did not found.

Thanks,

Alberto


[jQuery] Autocomplete plugin - varying the ac_results class for different instances

2009-10-07 Thread Nick

I've been using the jquery autocomplete plugin by Jorn Zaefferer
(thanks for the nice work).

My problem is that results are returned in a class=ac_results, and
I'd like to edit this class name at will with the initialization of
every instances so I can put them into different groups for styling
purposes.

I customized the styling of ac_results using the plugin's css file to
fit me needs, and that worked fine, because so far I needed only one
instance (or rather similarly-styled group of instances).

But now I need a second instance/group with different styling. If I
could specify the class name of the return results with
every .autocomplete initialization, that would solve my problem.
Problem is, I can't figure out if the plugin options permit this. At
one point early on when I started using the plugin, I thought I saw an
option like this, but now I can't find it.

Is this possible? Help much appreciated






[jQuery] (autocomplete) Extraparams and caching

2009-10-06 Thread johno

Hi,
I think there is a bug in autocompleter, when you use extraParams.
The
cache logic is just wrong because it takes extraParams not as a part
of cache key for lookup, so when you issue a request for a term
with
any parameters, the second search for a term will return cached
results regardless of extraParams. This causes problems for example
when we use a checkbox state as extraParams value.
The only way around this is to use cacheLength: 0, but adding
extraParams to cache key should not be a problem. Would you mind
fixing this?
johno


[jQuery] Re: Jquery autocomplete source code and instructions

2009-10-06 Thread Jörn Zaefferer
Right here: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

Source (for now) is here:
http://bassistance-plugins.googlecode.com/svn/trunk/plugins/autocomplete/

Jörn

On Tue, Oct 6, 2009 at 8:36 AM, sangram sangramred...@gmail.com wrote:


 hi,

 i have used previous version of jquery autocomplete plugin.

 now i wanted to use the latest version of the plugin, but i am unable
 to find the source anywhere!

 i have checked the site, the link to SVN is also not working. where
 can i get the plugin and instructions to use it ?

 any help?

 regards



[jQuery] Re: Jquery autocomplete source code and instructions

2009-10-06 Thread gurram sangram reddy
thanks jorn

On Tue, Oct 6, 2009 at 4:38 PM, Jörn Zaefferer 
joern.zaeffe...@googlemail.com wrote:

 Right here:
 http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

 Source (for now) is here:
 http://bassistance-plugins.googlecode.com/svn/trunk/plugins/autocomplete/

 Jörn


 On Tue, Oct 6, 2009 at 8:36 AM, sangram sangramred...@gmail.com wrote:


 hi,

 i have used previous version of jquery autocomplete plugin.

 now i wanted to use the latest version of the plugin, but i am unable
 to find the source anywhere!

 i have checked the site, the link to SVN is also not working. where
 can i get the plugin and instructions to use it ?

 any help?

 regards





[jQuery] autocomplete scrollbar not coming in ie

2009-10-06 Thread sangram

hi,

i am using latest version of jquery autocompletion plugin.
and have populated an array(input for autocomplete) abt 800 entries.

now strangely when i type a letter which triggers large results, i can
see a scrollbar in mozilla but not in Internet explorer 7.

i have only included  jquery.autocomplete.css and
jquery.autocomplete.js files in my jsp.

should i need to include anything else, what might have went wrong
with me?

any help?

thank you.



[jQuery] autocomplete

2009-10-06 Thread Jarosław Feith

Hi,
I have this strange problem. I am using autocomplete to help autofill
the form text input field width name of streets. User can choose
between streets of two towns, selecting the check box. I also added
autofill acceptance with pressing ENTER key. Everything works fine
until user changes the city by selecting second checkbox. Then ENTER
doeas not work, only click action with the submit button fires up the
function.

You can see this live at: http://www.mikolow.net/zasieg/27
try to type sth in Tu wpisz nazwe ulicy and hit enter or click
Sprawdz button. Some icons should appear below. Now try to select
the second radio type input...

Thanks for ANY help :)

Yarekh


[jQuery] (autocomplete) show selection list programatically

2009-10-02 Thread monsoon

Hi,

I'm using the autocomplete plugin: http://docs.jquery.com/Plugins/Autocomplete

I'd like to trigger the display of the selection list from javascript,
for example when an empty textarea get's focus, when a button on the
page is clicked, etc..

Is there a way to call an internal function to trigger the display of
the list? I've been at this for a little while now, with no sucess.

Thanks in advance!


[jQuery] (autocomplete) - possible bug

2009-10-01 Thread Machi

Hi people, first off thanks for the terrific job done with the
autocomplete pluggin.
However I think I found a bug:
I have an input text box with enabled autocomplete defined as follows:

$('#hostsTextBox').autocomplete(jsonHostsArray,
{
autoFill : true,
multiple : true,
mustMatch : true
});

Lest assume the following jsonHostsArray variable as follows:

jsonHostsArray = ['Windows', 'Linux', 'Mac'];

So, when I type w something, it brings Windows suggestion. Fine. Now
I set the cursor to the begging of the field and type L. The letter
makes is to the text box, the cursor automatically goes to the end of
the box and suggestion shows Linux (which I choose by hitting the
Enter key).
The result is: LWindows, Linux, which does not comply with the
mustMatch option..
I guess when I typed L in the wrong position, the control missed to
delete this incorrectly possitioned character besides from moving the
cursor to the right place.
Am I right?

Thanks in advance!


[jQuery] (autocomplete) - avoidRepeated option?

2009-10-01 Thread Machi

Hi!
I wondered if there were any plans to add another option, as stated in
the subject avoidRepeated which would work when option multiple is
set to true.

The thing is now I can choose a same element multiple times, which
makes no sense according to my business logic. I've been trying to
imagine where having the same item selected multiple times could be
useful, but still can think of a good answer, so I guess this could be
of interest to some other people as well.

Cheers,
Machi


[jQuery] (autocomplete) help about extraparams

2009-10-01 Thread pragard

Hi, i'm trying the jquery autocomplete from here

http://docs.jquery.com/Plugins/Autocomplete

On that page someone said that:

Often one autocompleted field depends on the value of another field.
In that case, the extraParams option can provide the necessary dynamic
parameter:

Consider an example where the states-field reuses the value entered
into the country field


And the examples was:

$(#states).autocomplete(url, {
   extraParams: {
   country: function() { return $(#country).val(); }
   }


What I'm trying to do is I made a combo box that contain country with
it's id, and I also have a input text that will do the autocomplete.
If I select one of the country from the combo box, I want input text
will show me, when I press some words with autocomplete function, all
of the city that include in that country (assuming I have it in my
database).

What should I do? Can someone give me some examples?

Thanks.


[jQuery] (autocomplete) multiple inputbox using same autocomplete function

2009-10-01 Thread Amit

code at the bottom is working fine .. wherein data is coming from
database via postcode.php in following format :

2221|BLAKEHURST|NSW
4401|ACKLAND|QLD
2221|BLAKEHURST|NSW
4401|ACKLAND|QLD
2221|BLAKEHURST|NSW
4401|ACKLAND|QLD

Now issue is I have multiple postalcode, city and state input box in
my code in same page like :

input type=text id=postalcode /
input type=text id=city /
input type=text id=state /

input type=text id=postalcodex /
input type=text id=cityx /
input type=text id=statex /

input type=text id=postalcodey /
input type=text id=cityy /
input type=text id=statey /



How should I go in this case ??

I just don't want to repeat the javascript code for them. Is there any
way I can pass variable seelctors and can get back result in same
way ?

-

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/demo/main.css type=text/css /
  link rel=stylesheet href=http://dev.jquery.com/view/trunk/
plugins/autocomplete/jquery.autocomplete.css type=text/css /
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.bgiframe.min.js/script
  script type=text/javascript src=http://dev.jquery.com/view/trunk/
plugins/autocomplete/lib/jquery.dimensions.js/script
  script type=text/javascript src=js/jquery.autocomplete.js/
script
  script


  $(document).ready(function(){




$(#postalcode).autocomplete(inc/postcode.php, {
width: 260,
selectFirst: false,
formatItem: function(data, i, n, value) {
return data[0] + , + data[1] + , + data[2];
}
});


$(#postalcode).result(function(event, data, formatted) {
if (data)
{
$(input#postalcode).val(data[0]);
$(input#city).val(data[1]);
$(input#state).val(data[2]);
}

});





  });
  /script

/head
body
input type=text id=postalcode /
input type=text id=city /
input type=text id=state /

/body
/html


[jQuery] autocomplete click send focus back to input

2009-10-01 Thread travisjbeck

are there any callbacks for me to hook into in order to send the focus
(); back to my input box when someone selects or clicks and
autocomplete item?


[jQuery] (jquery autocomplete) Result event isn´t tr iggering if no data has returned

2009-09-30 Thread Thiago Miranda de Oliveira

Hi..
I´m using something like that:
var defaults = {
minChars: 2,
cacheLength: 1,
delay: 300,
max: 10,
id: null,
city: null,
jsonaddress: 'teste.php',
matchSubset: false,
selectFirst: false,
dataType: 'json',
extraParams: {
state: null,
county: null
},
parse: function(data){
var parsed = [];
data = data.name;
for (var i = 0; i  data.length; i++) {
parsed[parsed.length] = {
data: data[i],
value: data[i].displayName,
result: data[i].displayName
};
}
return parsed;
},
formatItem: function(item){
return item.displayName;
}
};




};



$(obj).unautocomplete().autocomplete(defaults.jsonaddress,
defaults ).attr('name', 'display_name').after('input type=hidden
name=user_id class=ac_result').result(function(e, data, formatted)
{
if (data) {
obj.next().val(data.id);
$.countyid = data.id;
}
else {

obj.next().val('');
}


Hi.. I´m using this function and its working great when I type a term
that returns a data from the server (adding a data.id to a input that
I wish to control). But if the search return no data the Result Event
doesn´t trigger. Is there a way to empty the hidden input value when
there´s no data from the server??



[jQuery] (autocomplete) not selecting value unless user explicitly selects it

2009-09-30 Thread mikewertheim

I'm using the jquery autocomplete plugin.

Suppose the user starts typing, and the autocomplete presents a drop-
down of possible values.  If the user presses return, the first value
in the drop-down is selected.

What I want instead is the user experience that Firefox's search box
provides: As the user types, search suggestions are offered.  If the
user presses return without selecting a suggestion, what the user has
typed so far is submitted.  And of course, if the user does explicitly
select a value from the drop-down, then the selected value is
submitted.

Is there a way to make jquery autocomplete do that?


[jQuery] AutoComplete

2009-09-29 Thread GeeBee

I need to add an icon to the end of the field that automatically opens
the selection box. This is useful for smaller lists where the user may
wish to scroll through the list instead of guessing the first letter.
What javascript function can i call to emulate the min number of chars
has been reached?



[jQuery] autocomplete

2009-09-29 Thread Asa Carter

Hi

My php is returning via json:

a string (name) which is displayed in the text box
an int (location_id)

When the form is posted I would also like to post 'location_id' as
well as / instead of 'name'.

My js is below. what do I need to do to be able to post the
location_id.

$(#quick-search).autocomplete('/includes/search.php', {
width: 300,
scroll: false,
dataType: json,
parse: function(data) {
return $.map(data, function(row) {
return {
data: row,
value: row.location_id,
result: row.name
}
});
},
formatItem: function(mail) {
return mail.name;
}
});


Thanks

Asa


[jQuery] [autocomplete] having issues matching when there are single quotes or apostrophes

2009-09-29 Thread Frank

Hi,
This is only happening in the JSON+emails example form the demos. If I
insert john'doe into the array and I start typing doe, autocomplete
will find john'doe. However if I start deleting characters (from back
to front, starting from letter e) autocomplete will not show any
matches until I've deleted past the apostrophe/single quote. On the
other hand, in the birds example, if my match was Cetti's Warbler and
I start deleting characters, autocomplete will continue to find
matches as I keep removing characters. This bird example is similar to
the emails example except it does not use JSON. So is the issue
related to JSON?

TIA


[jQuery] [autocomplete] How do I keep the result box on top and not fill the inputbox

2009-09-27 Thread rolandd

Hey guys,

After a bit of struggle I have the autocomplete function working for
me yay :) Now there are 2 more things I want it to do but can't seem
to find it.

1. How do I keep the result box on top so I can click more than 1
value (each click adds a result to an option box)
2. How do I prevent autocomplete from filling the input box with the
clicked value?

Thanks for your feedback.


[jQuery] [autocomplete] can't get json demo to work

2009-09-27 Thread Frank

Hi
I'm trying to set up the json example that comes in the demo zip file
(json.html + emails.php). When I test it locally every thing works
great however when I move emails.php to my site (hosted by godaddy) it
stops working; i.e. nothing gets pulled in when I start typing in the
textbox. godaddy is running php 5.2.8 with json module 1.2.1 enabled.
TIA


[jQuery] autocomplete, extraParams and $(this)

2009-09-26 Thread patrickk

I´m a bit confused, because the following doesn´t seem to work and I
have no idea why ... after searching google for a couple of hours and
trying different solutions, I´m posting this here and hope that
someone can help.

$(input.vAutocompleteField).autocomplete('/
autocomplete_lookup/', {
highlight: false,
mustMatch: false,
matchContains: true,
cacheLength: 20,
minChars: 2,
extraParams: {
'extra_var': function() {
return $(this).attr('id');
}
}
});

extra_var should be the ID of the current input-field.

this is probably just me don´t seeing what´s wrong ... so any help is
appreciated.

thanks,
patrick


[jQuery] [autocomplete] auto complete based on additional input value

2009-09-25 Thread Frank

I'm using one of the examples from the demo files as a template.
Basically I'd like to auto suggest hospitals based on the zip code
that's entered from another input. Can someone recommend how do
accomplish this? TIA

This is the local data set:
var hospitals = [
{ name: hospital 1, zip:
1},
{ name: hospital 2,   zip: 2},
{ name: hospital 3,  zip:
3},
{ name: hospital 4,  zip: 4},
{ name: hospital 5,zip:
5},
...


and here's the autocompleter:

script
$(document).ready(function(){

$(#example).autocomplete(hospitals, {
matchContains: word,
max: 8,
width: 500,
scrollHeight: 300,

   extraParams: {
   return 1;
   },


formatItem: function(row, i, max) {
return row.name + em (zip code:  + row.zip + )/em;
},

formatMatch: function(row, i, max) {
return row.name;
},

formatResult: function(row) {
return row.name;
}

});

});
/script

input id=zipcode /
input id=example /


[jQuery] (autocomplete)

2009-09-24 Thread Ordos

I am using the jQuery plugin autocomplete on an country input field:

I got this php array with countries in dutch:
$global_countries = array();
$global_countries['AF'] = 'Afghanistan';
$global_countries['AX'] = 'Ålandseilanden';
$global_countries['AL'] = 'Albanië';
...

Then php implodes the array and evals a html file to fill the js var.
This is in my html file:

var countries = [$countries];
$(#country).autocomplete(countries, {
minChars: 2,
max: 12,
autoFill: false,
mustMatch: true,
matchContains: true,
scrollHeight: 220
});

But now, when I start to type a country I get ALL special characters
like: Belgi�

If I use php htmlentities on each country it is displayed like it
should in the select list, but when selected I see the ASCII code of
course. België becomes Belgieuml;


[jQuery] [Autocomplete]autocomplete in textarea

2009-09-24 Thread td liao

hi guys

i had used jQuery autocomplete in a textarea
i want the suggest results show in where i'm typing, not outside the
textarea.
i checked jQuery autocomplete source code, finding in line 722 is the
core code.

show: function() {
   var offset = $(input).offset();
   element.css({
   width: typeof options.width == string ||
options.width  0 ?
options.width : $(input).width(),
   top: offset.top + input.offsetHeight,
   left: offset.left
}).show();

top and left are what u want to change.
but i don't know how to get my typing position and use it in the case.


[jQuery] [Autocomplete]autocomplete in textarea

2009-09-22 Thread td liao

hi guys

i had used jQuery autocomplete in a textarea
i want the suggest results show in where i'm typing, not outside the
textarea.
i checked jQuery autocomplete source code, finding in line 722 is the
core code.

show: function() {
var offset = $(input).offset();
element.css({
width: typeof options.width == string || options.width  0 ?
options.width : $(input).width(),
top: offset.top + input.offsetHeight,
left: offset.left
}).show();

top and left are what u want to change.
but i don't know how to get my typing position and use it in the case.


  1   2   3   4   5   6   >