similar to: Populating a select field using observe_field

Displaying 20 results from an estimated 1000 matches similar to: "Populating a select field using observe_field"

2006 Apr 06
0
3 doubts on observe_field
Dear friends, with the yours aid already I obtained to use observe_field, but still I am with some problems and necessary again. They are three questions to long of the source code below. Since already I am grateful for the tips. ==== _form.rhtml <!--[form:city]--> <p><label for="city_state_country_id">Pa?s</label><br/> <select
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
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/.
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 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 =>
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 => { :action => ''preview_text''}) %> My
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
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'': $(''record_ohrmarke'').value = ''a
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
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 =>
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"
2006 May 17
3
RJS behave differently than render :partial?
I have a method in my controller like the following (the syntax may not be correct, I''m doing this from memory - you should be able to get the idea though) My rhtml page has a DIV with id="country_areas", which contains a partial that only makes a drop down of country areas for a specific country. When changing the country in the country drop down, it uses the
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 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 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" } %> </p> <%= observe_field :user_tmp_type, :update
2006 Apr 28
2
Calling Javascript function using observe_field
I''m trying to call a simple javascript function from within an observe_field. It is possible to replace the :url with :function to call a function. But since there are no examples, and I''ve tried a bunch of iterations, can someone show me sample syntax? I''d like to do something like: <%= observe_field :FormOptions1, :frequency => 0.25,
2006 Nov 04
0
observe_field and datetime_select
Hello all, I have a form with a datetime_select. I need to use the actual time selected in an action triggered by observe_field. Could make it work with other select fields, but not with datetime_select. Seems that observe_field can locate the element just by the id (not by the name). If so, how can I set the ID of datetime_select ??? I''m in this for some hours, but could not find a
2006 Jun 27
0
Using passed-in locals in observe_field in a partial
I need to be able to assign a value to the field_id field of observe_field inside a partial. Ideally, it would look something like: <%= observe_field(local_variable_name1, :url => {:action => ''some_constant'', :id => local_variable_name2}) %> I''m not having a problem with the assignment to :id of local_variable_name2. But I can not figure out how to use
2006 May 23
0
observe_field internet explorer
Hi, I have the following observe_field which works in Firefox but doesn''t do anything in Internet Explorer .. as though it doesn''t exist. How can I debug this in bloody MS world. <%= text_field :drawing, :job_no, :title =>"Job ''begins''", :autocomplete => "off", :onclick => "$(drawing_job_no).value =
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