search for: observe_field

Displaying 20 results from an estimated 199 matches for "observe_field".

2005 Dec 31
4
observe_field with dynamic forms
I have a form where I dynamically add form elements based on user input. An example is that when a user selects a "server" from a select box I add (via AJAX calls back to server) a "type" select box pre-populated with valid choices for that server. I do this by using observe_field on the "server" field and update a div on the page with the new "type" select box. So far so good. The form submits with all the proper values. Now I want to watch the newly added "type" field with observe_field but it doesn''t work. I never see the cal...
2008 Jun 19
5
observe_field
I have been trying to pass a collection_select parameter and a text field parameter to observe_field so that it watches both the parameters simultaneously. but what i can see is , when i select some value from drop down and dont write anything in text field its giving correct results.parameters are also correct passed, but just after that if i write something in text field that value also get pas...
2006 Jul 12
2
Can''t get observe_field to take a variable for a field name
The subject pretty much says it all: I can''t?get observe_field to take a variable for a field name I''ve tried: <%= observe_field(var_name, ... <%= observe_field("#{var_name}", ... <%= observe_field(:"#{var_name}", ... No luck. Am I missing something? Thanks, : ) Jason -- Posted via http://www.ruby-forum.com/.
2006 Aug 10
7
Radio Button events
Hi, I have observers for a group of radio buttons, an observe_field for each radio button (I think its not possible to have one observe_field for a group of radio buttons). Now, the problem is that when I click on one radio button, all the observers get trigerred, so the method which the observe_field calls gets the wrong result. I just want that method to get...
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='' + $F(''citi'')", :url => { :action => ''remote_city_choosen'' }) %>...
2009 Jun 14
6
Unable to make observe_field work
I can''t make it work. <%= text_field_tag :friend %> <%= observe_field :friend, :url => friendships_url, :on => :click %> <%= javascript_include_tag :defaults %> Raises the error:Can''t find variable Form. The generated html is: <input id="friend" name="friend" type="text" /> <script type="text/j...
2006 Jun 27
2
Bug in Firebug or in RJS? Or something else?
...9;m getting a really strange result using RJS page.replace_html and wonder if anybody knows anything that could help me figure it out. I''m rendering a partial in a loop in edit.rhtml that puts a set of <div>s on the page, each <div> containing a checkbox_tag with an associated observe_field and a text_field_tag also with an associated observe_field. When the checkbox changes the observe_field shoots an AJAX message back to the controller which, when it''s finished doing its database-update thing, does a render :update do |page| page.replace_html ... which is _supposed to_ *r...
2010 Feb 08
1
can use use observe_field with a 3rd party server?
...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 type this into a browser directly and it works just fine, but when i try to use it with observe_field, it fails, i always get a result back of empty string. Am I violating some rule about cross-site ajax calls? Can I have my server generate the observe_field code which calls a 3rd party server for ajax updates, like observe_field? Here''s my code: <%=observe_field "query_box&quo...
2008 Dec 22
2
how to use the observe_field to get more than one field?
Hi, I have two selctdropdown boxes name like "resolution" and "codecname". Now i am able to get the single field value either from resolution or codecformat select box. ex: observe_field ''resolution'' or observe_field ''codecforamt'' is there any way to get the two fields in to the observe_field method ? Can anyone give me suggestionfs or ideas on this? thanks Srikanth --~--~---------~--~----~------------~-------~--~----~ You received this messa...
2007 Sep 17
1
observe_field and :function
Hi, I m using the observe_field helper with the :function attribute. If I do the following everything it works without any issue: <%= observe_field ''select_gender'', {:function => "(value == ''2'') ? $(''record_ohrmarke'').value = ''a boy'':...
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 butt...
2008 Apr 15
2
Asking for help passing variables with an observe_field
Hi, I have the following observe field: <%= observe_field :session_treatment, :url => { :action => ''retrieve_rate'' }, :with => ''treatment'' %> This passes on the ''treatment'' variable to the action, but I''d like to pass another variable and I''m having a hard time figuring o...
2008 Feb 27
2
observe_field not generating any script
...w user</h1> <% form_for :user, @user, :url => { :action => "create" } do |form| %> <%= render :partial => ''form'', :locals => { :form => form, :genders => @genders} %> <%= submit_tag "Create" %> <%end%> <% observe_field("user_country", :function => "alert(''Element changed'')") %> <========= line of interest <%end%> which renders a partial, and includes a select with id "user_country" The html for this is: <select id="user_countr...
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 => :sear...
2006 Oct 18
1
observe_field, GET method and RESTful controllers
Hi all. I am trying to work with restful rails and have come across a quandry with observe_field. I basically want the observe field to call a show action on a restful controller. However I am unable to do so because I cannot get the damn thing to use the get request properly. If I use the following: <%= observe_field("project_selector", :update => "project_selector_di...
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 display_compatible render :partial => "compatible" end ( Right now the _compatibl...
2006 Jan 18
4
That ol'' AJAX select box update again : observe_field does nothing
...b_phase_id]"><p><label for="job_job_phase_id">Job Phase</label><br/> <%= options_from_collection_for_select @jp, "id", "description", job.job_phase_id %></p> </select></p> </td> <%= observe_field(?job.job_phase_id?, :frequency => 0.25, :update => ?action_container?, :url => { :controller => ''job'', :action => :get_action_from_phase }, :with => ??job_phase_id=?+value?) %> <td id=''action_container...
2006 Jul 21
4
observe_field submit behavior
I am using observe_field on a number of multi-selects and checkbox form elements whose values would normally come in as arrays on a normal (non-Ajax) form post. I understand that by using the :with => ''name'' I will get name=value in the request.raw_post however if the field I am submitting has mut...
2006 May 31
2
observe_field gets "Form is not defined"
trying to do an observe_field, but i''m getting a javascript "Form is not defined" error [code] <label>Account Type:</label> <%= select :user, ''tmp_type'', [''choice_one'',''choice_two''], { :prompt=>"select account type&qu...
2006 Apr 04
0
Does observe_field work with date_select?
I can''t get observe_field to do anything with my date_select. Here''s the rhtml code: <%= date_select ''course'', ''lab_start_date'' %> <%= observe_field(:course_lab_start_date, :frequency => 0.5, :update => :course_lab_start_date_div, :url => {...