Displaying 20 results from an estimated 1100 matches similar to: "need help with observe_field"
2006 Jun 21
5
Problem with observe_field
Hi folks,
I have following in my view :
===================
<div class="foo">
<%= select ''theme'', "id", Theme.find_all.collect {|t| [ t.name, t.id
] }, { :prompt => ''Select a theme'' } %>
</div>
<%= observe_field(
:theme_id,
:update => :my_style,
:url => { :action => :themelookup, :id => @space,},
2007 Mar 16
7
how to send mp3 inline?
hey all,
I''m trying to do a:
send_file @file, :type => ''audio/mp3'', :disposition => ''inline'' ,:stream=>true
I tried with all browsers and it always asks me to download the file
or open it with a player. Is there a way to make it open in the
embeded player (QT,Windows media player,Mplayer etc)? Only with
konqueror if I open in new tab then I
2006 Dec 16
5
trying to add another app
hey all,
I have an app working great with apache2 and mongrel_cluster.
However, I''m trying to run another application and now when I go to
app1.comit falls to
app2.com and the opposite. That''s probably because I messed up somewhere
with the cluster.
this is the content of my conf.d/app1.proxy_cluster.conf:
<Proxy balancer://mongrel_cluster>
BalancerMember
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 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='' +
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 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
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
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
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit
to rspec. I have the rspec gem version 2338, the rspec and
rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in
vendor/rails.
I''ve been able to get a few specs passing, have gotten the specs running
from autotest, and am able to do "rake spec:doc" and get the basic
command
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 out how to
write it. Any help would be
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 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 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 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
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,
2008 Feb 27
2
observe_field not generating any script
Hi - I have a view:
<% content_for(:page) do %>
<h1>New user</h1>
<% form_for :user, @user, :url => { :action => "create" } do |form| %>
<%= render :partial => ''form'', :locals => { :form => form, :genders
=> @genders} %>
<%= submit_tag "Create" %>
<%end%>
<%
2006 Aug 13
2
Catching "keypress" event with observe_field
I''m desperately trying to update a div when a key is pressed in a text
field.
Eg. :
<input type="text" id="field">
<div id="area"></div>
<%= observe_field :field, :url => {:action => :myAction}, :update =>
:area, :with => "text_param", :on => ''keypress'' %>
This does not seem to work, and I