Displaying 12 results from an estimated 12 matches for "selectedelement".
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
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
...name_auto_complete"/>
<script type="text/javascript">
new Ajax.Autocompleter(''supplier_name'', ''supplier_name_auto_complete'',
''/products/auto_complete_for_supplier_name'',
{afterUpdateElement: function(element, selectedElement) {
$(''product_supplier_id'').value =
selectedElement.id.substring(1);}});</script>
app/views/products/auto_complete_for_supplier_name.rhtml:
<ul>
<%= render :partial => ''supplier'', :collection => @suppliers %>
</ul>
app/views/...
2006 Mar 29
0
auto_complete_on_select don''t work correctly
...tlat" type="text" value="-" /> the value 1.2
and in <input id="inputlong" type="text" value="-" /> the value 3.0
I have used auto_complete_on_select but not work.Any suggestion?
The code is:
function auto_complete_on_select(element, selectedElement)
{
document.getElementById(''inputlat'').value =
selectedElement.childNodes.item.getElementsByTagName(''span'')[0].innerHTML;
document.getElementById(''inputlong'').value =
selectedElement.childNodes.item.getElementsByTagName(''span'...
2005 Aug 17
3
Ajax.Autocompleter
I have been working with the Ajax.Autocompleter for about a day so
forgive my ignorance. Is there any value in adding additional
callbacks. I want perform an action when the user selects a choice.
So I was thinking of adding an option {select:
function(selectedElement) {}} similar to the callbacks on Ajax.Request
in the prototype library. Call me out if you think I am crazy my
feelings won''t get hurt. After looking at the code I guess I would
probably add it to the Autocompleter.Base.
Nicholas
2006 Jan 10
0
Customizing autocomplete to update more than one value upon vaule select
...ription, buy price, and unit weight should be updated
automatically.
To try and achieve this I have implemented the following:
view:
<td rowspan="2" align="center"><%= text_field_with_auto_complete( :product,
:product_code, {}, { :updateElement => ''function(selectedElement){
alert("Element Selected: " + selectedElement.id);}'' }) %></td>
<td rowspan="2" align="center"><input type="text" id="description_#{@counter}"
size="40"></td>
<td align="center"><inpu...
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 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
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"
2008 Mar 20
0
Autocomplete and Firefox
.../controls.js.orig 2008-03-20 10:35:44.017733000 -0400
+++ ./src/controls.js 2008-03-20 10:36:30.861783400 -0400
@@ -244,6 +244,7 @@
if(nodes.length>0) value = Element.collectTextNodes(nodes[0],
this.options.select);
} else
value = Element.collectTextNodesIgnoreClass(selectedElement,
''informal'');
+ value = value.strip();
var bounds = this.getTokenBounds();
if (bounds[0] != -1) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group...
2006 Nov 04
4
live search
hi all,
i have implemented live search using scriptulous and i am getting the list
the problem is that when i select an item from the list white spaces gets
appended in front " item" of the selection in firefox and in opera
front and behind " item "
i printed the value in console and saw it gives "item" but in textbox after
selection whitespaces gets appended
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...unction() {
this.active = false;
this.updateElement(this.getCurrentEntry());
@@ -244,7 +244,7 @@ Autocompleter.Base = Class.create({
if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
} else
value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
-
+
var bounds = this.getTokenBounds();
if (bounds[0] != -1) {
var newValue = this.element.value.substr(0, bounds[0]);
@@ -257,7 +257,7 @@ Autocompleter.Base = Class.create({
}
this.oldElementValue = this.element.value;
this.element.focus();...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply
to this email, as some of the replaced lines are too long, so git
won't let me send the email. However, there is nothing wrong with
that patch, and it should be applied in the sequence listed below.
Note also that I assume this will be tested on a clean f11 install, rather
than an upgrade of an existing ovirt server