Displaying 20 results from an estimated 90000 matches similar to: "observe_field and onkeypress"
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
I am trying to rewrite my website in Rails 3 and Ruby 1.9.2.
Can some one help me convert my observe_field which is working under
Rails 2.3.5 to Rails 3. I would like to avoid using JQuery as over the
last year everything I have tried in JQuery has failed, including this
one. Perhaps due to my lack of knowledge. I would not like to install
the legacy upgrade.
What I have in my website is several
2006 Feb 13
2
[PATCH] Allow generic autocompleter (Ajax.Watcher)
Hey. Below is a patch to allow generic Ajax.Autocompleters. Basically
it''s for people who wanna be able to watch an input for changes, but
don''t want it to pop up an autocompleter box below. Useful for live
previews, that kind of thing.
Someone''s gonna have to fix the tabstops. I couldn''t be arse to work out
how to make vim do the softtabs properly. Spaces for
2010 Oct 02
0
Ajax observe_field not vorking on Rails
down vote favorite
I am trying to create some kind of search in my ruby on rails
application and I want to add ajax support. I want when a user types in
a search box a word, ajax automatically generates the results. And I
have searched almost all internet and I couldn''t find answer to
following question:
When I type into my text area nothing happens. It is like ajax is not
working at
2010 Feb 08
1
can use use observe_field with a 3rd party server?
Hi-
I''m trying to implement an auto-complete using Yahoo''s autocomplete
server, which basically suggests search completions:
http://ff.search.yahoo.com/gossip?output=fxjson&command={your
searchterms}''
if you want to see the results in your browser, use xml instead:
http://ff.search.yahoo.com/gossip?output=xml&command={your
searchterms}''
So, I can
2006 May 23
1
Help with observe_field
Folks,
When I use observe_field, I get a javascript error "Form is not
defined". Any thoughts?
__View: search.rhtml__
<label for="search">Search:</label>
<%= text_field_tag :search %>
<%= observe_field(:search,
:frequency => 0.25,
:update => :search_hits,
:url => { :action =>
2006 Apr 24
0
observe_field inside of a form?
Hi I''ve just started experimenting with AJAX in Rails and have come
across this issue.
I''m trying to set up some ajax form validation on a login form. I set
up an observe_field method for the username field but the action for
the containing form is being called and rendered instead of the
action I specify in the observe_field method.
All of the observe_field examples
2006 Mar 01
1
observe_field question
I''m sure this is a simple problem, but I''ve been working on it for a
couple days and can''t seem to figure out the correct way to structure my
observe_field call. The HTML and Javascript generated all appear
correct, but the AJAX call is never made. Below is the code I''m using
and any help would be much appreciated.
models_controller.rb
def
2007 Jul 26
0
Problems with RJS & Ajax
I try to create an "onKeypress" event handler for a form but nothing
works!
I have already studied the reference books on Ajax, but that didn''t
help.
Can someone explain me how todo this?
These are the code-snippets:
1) application.js
var GridControlTracker = {}
GridControlTracker = {
gridEventHandler: function(element, value) {
alert(''Key Pressed / element:
2006 Jul 11
9
problems with observe_field
Hi all, I''m having problems with an observe_field, this is the view:
<%= form_tag %>
<div id="content">
<p>Customer:
<select name="cliente_id" id="cliente_id">
<option value="">Select a customer</option>
<%= options_for_select Cliente.find_all.collect {|c| [c.razon_social,
c.id]} %>
2006 Jun 28
3
observe_field and radio button... does not work?
I try to catch click event on radio button, but nothing is executed....
Tested with RoR 1.1.2 and 1.1.3. What am I doing wrong?
<%= radio_button_tag(:city, ''Dublin'') %>
<%= observe_field(:citi, :frequency => 0.5,
:on => ''click'',
:with => "''city='' +
2006 Jan 18
4
That ol'' AJAX select box update again : observe_field does nothing
Hi,
I know this has been asked a million times before - but I still don''t
really get it. CAn someone please tell me what''s up with the following;
In a view I have (apologies for the formatting);
<td>
<select id="job.job_phase_id" name="job[job_phase_id]"><p><label
for="job_job_phase_id">Job
2006 Feb 09
6
troubleshooting an observe_field
Hi,
I''ve got a live_search field in a partial that is on several different
pages. On all pages, except 1, it works fine. On the page it doesn''t work
on, it seems it never executes it action.
Here''s my observe_field code inside the partial:
<h1><label for="searchtext">Live Search:</label></h1>
<%= text_field_tag :searchtext
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
I made a pretty lengthy post on what I''m doing here:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/89a2b8e54a874dd9
Short version:
I have a radio_button group of two. If one is clicked another pair of
radio buttons is added, if the other is clicked it is removed.
observe_form does not work for elements added after initial page load.
observe_field does not work
2006 Mar 08
4
Event.Observer - (was: Ajax.Autompleter not working on IE)
See if I can stir up a little life with a demo. I can''t believe that
Ajax.Autocomplete doesn''t work on IE, so I *must* be doing something
wrong.
Trying to figure this out I added some alerts to control.js and it
seems that IE is not getting the onkeypress events.
So, here''s a demo:
http://hank.org/demos/form.html
That contains two fields with onkeypress events:
2006 Jan 19
1
Populating a select field using observe_field
Hi,
I''ve just started toying with Rails and AJAX, so forgive me if this is a
bit of a stupid question. I''m trying to populate a select field when the
value of another select field is changed. Looking through the API doc,
it seems like observe_field is what I need.
In my view I have:
<p><label for="wine_country_id">Country</label><br/>
2008 May 30
4
How to deal with observe_field in partials?
Hiyas
I''m having a little problem with a observe_field in a partial
"bokings/room_list":
<%= select_tag "room_#{room.id}_grownups", options_for_select([0, 1, 2],
room.grownups.length) %>
<%= observe_field "room_#{room.id}_grownups",
:url => set_number_of_grownups_booking_room_url(:id => room.id),
:with =>
2008 Oct 24
4
Railscast 75, Observe_field and Shopping Cart
Hi all,
I have the shopping cart page where a user can add items dynamically
through ajax as explained in Railscast episode 75. I am using
observe_field to observe the ''quantity'' and ''cost'' fields to update
the total field for each item.
This does not work however, for records that are added through the
Ajax. How can i name the fields and observe them as i have
2006 Aug 04
2
observe_field for radio_button
Hi,
I need to observe a set of radio buttons but am having great trouble. My
observe_field looks like this:
<%= observe_field :user_select, :frequency => 0, :url => { :action =>
:admin_control } %>
Now it works fine if I use a text_field like this:
<%= text_field :user, :select, "size" => 20, "maxlength" => 16 %>
But I want a radio button, and
2006 Jul 20
1
Ajax and observe_field not updating specified DIV
I have a page that has a dropdown which i''m using observe_field on to
make an ajax call back to my controller. The page initially displays
fine. The method is invoked in my controller when i select a choice in
the dropdown and I have an rjs file which is then invoked. The rjs file
looks like this:
page.replace_html ''embed_calendar'', :partial =>
2006 Feb 03
2
JavaScript Prototype Help?
I have a form with a text area. I want to have an observer watch the
text area and update a div with the running count of characters in
the text area. I tried "onchange" but that doesn''t update until you
leave the text area. I was able to get it working using AJAX, but
it''s silly to make a needless round trip to the server, when the page
already knows