Displaying 20 results from an estimated 400 matches similar to: "autocompletion: hooking ''afterUpdateElement'' in Rails"
2006 Apr 01
1
piggybacking an action on an autocompleted field
Hi everybody,
I''d like to add a custom action to be triggered after/when an
autocompleted field has been/is beeing updated by the autocompletion
process.
I tried the obvious - a field observer -, but it doesn''t work (see code
below). I know I could write the autocompletion code myself, but I
wonder if there is a simpler/more elegant way?
Any idea?
TIA
Alain
The
2005 Dec 08
4
AutoCompleter afterUpdateElement
Any ideas how I can submit say, a person ID instead of the person''s name
on an autocompleter input field? Surely this is a common need.
Thanks!
Daniel
2006 Feb 16
2
Autocompleter question
Hey all,
When using the Ajax.autocompleter, how would I configure it so that the
user is searching based on an entry''s name, but once they select an entry, I
record the ID?
I have the user entering a person''s name in a text box to make it easier
to find contacts in a large database. I know that I can display content
that doesn''t end up in the textbox by using
2006 Aug 02
2
Passing Ajax.InPlaceEditor options
I''ve followed the instructions in the Rails Recipe #1 and have the
in_place_editor_field working but now I want to tweak how it looks and
behaves. I''d like to be able to override the default yellow highlight color,
which is done using the highlightcolor param according to the scriptaculous
documentation (unless I''m missing something).
I''m new to Ruby and Rails
2006 Nov 04
2
in_place_editor_field submitOnBlur & okButton=false options?
I have a few in_place_editor_fields working fine. I can access some of
the script.aculo.us options such as :cols, :save_text, :cancel_text, but
how do I access the okButton = false & submitOnBlur options? Basically,
I want no submit button, a cancel button, and the ability to submit when
I tab out of the field.
Is this doable without writing a helper? (avoiding digging that deep so
2007 Sep 07
0
Autocomplete Questions (Umlaut,AfterUpdateElement)
Hello all
I got 2 little questions:
The first is, what can i do, when some special Chars like "ä", "ö",
"ü" doesn''t work. Is there a way to edit .js files, and where. ex: if
i use the general AJAX.Request with "postbody: ''name''+escape(var)" it
will work cause of the escape function, but then i had to write the
whole autocomplete
2006 May 31
3
textfield_with_auto_complete - filling two fields
I am going nuts here..
I have a form where users can write a city name (used with
auto_complete) - and once they click on the desired city in the dropdown
menu - I would like to have the Country field filled automatically as
well...
Is this possible at all ?
If so, can somebody please tell me where I can find some documentation
on the subject, or preferrably an example ?
Many thanks in
2006 Apr 16
2
:after_update_element on text_field_with_auto_complete
I have a a basic prototype coded:
#view
<%= text_field_with_auto_complete :student, :last_name, { :size => 15
},
:after_update_element => "alert(''hello world'');" %>
#controller
class ScoresController < ApplicationController
auto_complete_for :student, :last_name
end
If I take out the :after_update_element option everything works as
advertised.
2006 Mar 09
15
regular expressions slay me
I am furiously trying to find what I am looking for in Pickaxe book and
not finding it.
I''m getting some values back from a posted form and I need to get the
''id'' number off the backend. The ''String'' will always come back to me
as...
Some_name\r\n123
where 123 is actually the id number which I need to execute the find.
The reason they are coming back
2006 Mar 18
2
in_place_editor change request...
Hi,
How do I make a request to the Rails team to include a line something
like:
js_options[''savingText''] = %(''#{options[:saving_text]}'') if options
[:saving_text]
in the in_place_editor method?
script.aculo.us supports the ''savingText'' option to control the text
displayed while saving after an in-line edit. Having the ability to
2005 Dec 06
9
script.aculo.us AutoComplete Woes
I was wondering if someone could help me with an autocomplete problem. I
have the autocomplete div receiving a <UL> that looks like:
<ul>
<li>Name<br>Email</li>
</ul>
When the user hits enter and the value is filled into the text field
it''s putting both the name and email in the field. I just want the name.
Funny this works in Firefox but not IE. I
2005 Sep 22
6
Autocomplete - setting a second value?
I''m using the autocomplete function, and need a way to grab a second
value from the ajax request... an example would probably speak better:
This is my HTML:
<input name="CustomerName" id="CustomerName" type="text" />
<div id="CustomerList"></div>
<input name="CustomerID" id="CustomerID"
2006 Jun 21
11
scriptaculous question
Hello everybody.
I''m wondering if there is away with scriptaculous to update multiple form
fields with data after finishing an autocomplete request.
Heres an example.
Joe BlowSchmoe fills in his name and starts to type in the customer number,
he selects the approprate customer number from autocomplete list, and bam
the address associated with the customer number is populated into the
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
Yeah, right... I posted this to the Rails mailing list.
Sorry for people who see duplicate posts.
-------- Original Message --------
Subject: [Rails] Re: [Rails-spinoffs] Autocomplete - setting a second value?
Date: Mon, 26 Sep 2005 10:05:24 -0400
From: Fran?ois Beausoleil <fbeausoleil@ftml.net>
Reply-To: rails@lists.rubyonrails.org
To: rails@lists.rubyonrails.org
References:
2006 Aug 07
1
Escape ''&'' in text_field_with_auto_complete
Good day.
I have searched on the net and through the archives to now avail as of yet.
I have a text_field_with_auto_complete that searches for company names.
These company names obviously can have an ''&'' in the name of the company
(example Barnes & Nobel).
The auto complete works beautifully.
However, the problem arises when I pass the name of the company to the
2006 Feb 20
1
[Prototype] onSuccess Event and Ajax.Updater bug in IE
Hi all,
Is there a known bug with Ajax.Updater not working in
IE6? I''m having
trouble with a Autocompleter control that calls a
function that contains
an Ajax.Updater as an AfterUpdateElement callback. It
works fine in
firefox, but I don''t think Ajax.Updater gets called
under IE.
http://pastebin.com/563889
1.
function updater(input, item) {
2.
var
2006 May 26
5
scriptaculous - auto complete textbox with a drop down
Hi,
I''m using scriptaculous to provide an auto complete textbox - and it
works perfectly - but I was wondering if there was anyway to let users
navigate the choices using the keyboard i.e the curor keys as opposed to
having to use the mouse? Apart from that it''s perfect! :)
Cheers,
Pete
--
Posted via http://www.ruby-forum.com/.
2006 Apr 16
2
AJAX effect when inserting new div
Can some one point me in the right direction?
I''ve got several pages that will respond to user input by creating a new
div in the content area. I want that new div to visually expand into
view or flash with a background color rather than just appear.
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 21
1
RE: [Prototype] onSuccess Event and, Ajax.Updater bug in IE
Joe,
After removing all occurrences of charset=utf-8 from
my headers I am
still getting the same bug in IE.
Currently, it''s Content-Type: text/html
Any other suggestion?
Nathan.
> Message: 2
> Date: Mon, 20 Feb 2006 09:13:57 -0500
> From: "Joe Hudson" <joe-x8g0hQFNjJhWk0Htik3J/w@public.gmane.org>
> Subject: RE: [Rails-spinoffs] [Prototype] onSuccess
Event
2007 Feb 17
2
Quick question regarding updateElement
How do you pass the selected value to the function?
new Ajax.Autocompleter(''text'', ''auto'', ''file'',
{paramName:''autocomplete'', updateElement:sayhi});
function sayhi(???){
alert(???);
}
I''ve tried element and element.value but that didn''t work.
--~--~---------~--~----~------------~-------~--~----~
You