Displaying 20 results from an estimated 3000 matches similar to: "Catching "keypress" event with observe_field"
2006 Mar 13
2
Keypress events with no AJAX needed
Is anyone else finding it frustrating to do in Ruby client-side things
that would be simple in Javascript?
It seems like all of the "helpers" involve server (controller)
communication.
For example, having a text field that just echos below what the user
types.
Is this the only way to do it?
<div id=''word_panel''>
<%= text_field_tag
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
2006 Jun 26
3
syntax for observe_field( :with =>
Greetings!
What is up with the syntax of this thing? I mean, if the only thing I can send back using :with is the field being observed, then why in the world is the syntax so convoluted? For example, what I''ve been able to get working is:
<%= text_field_tag(''date'', illness_date, :size => 30) %></p>
<%= observe_field(''date'', :url
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 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 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
2007 Jul 16
4
Problem with keypress event handling
Hi all,
we are writing a cross browser Javascript control that enhances the
HTML text input element in order to accept only digits (more or less).
Supposing that ''domText'' is the DOM element corresponding to the HTML
text input, we wrote the following:
Event.observe(domText, "keypress",
this.onKeyPress.bindAsEventListener(this));
where
this.onKeyPress =
2006 Jun 27
2
Bug in Firebug or in RJS? Or something else?
I''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
2006 Mar 29
2
Drag/Drop and KeyPress
Hi!
is it possible to make a drag dependent on a KeyPress event? I couldn''t
find any information on that on the script.aculo.us website.
My scenario is the following:
I have a tree with several nodes (like windows explorer). Right now i
use Drag & Drop to move a node below a new parent.
Now i want to implement a copy mechanism which allows the user to copy a
node through Drag
2005 Nov 09
3
AJAX form Parameters jumbled.
Sorry for the repost but I originally posted this as a response to
another thread. I have a text field called ''phrase'' but the
parameter values always come up as nil and when I check the
parameters dumped in the error message I do not get the normal hash
you''d expect. Instead of something like
{"phrase"=>"jim"}
I get:
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
2006 Jul 26
8
change text_field_tag class
in my booking / _form I have the following input fields : (startdate and
endate)
<div>
<label for="startdate">Booking Start Date</label><br />
<%= text_field_tag(''startdate'', @startdate, {:class => @startdateclass,
:readonly => "readonly", :maxlength => "25"} ) %>
<%= observe_field("startdate",
2007 Dec 27
6
populate data in another fields on selection
Hi,
I would like to know how to populate data in another text fields on
selection from a drop down
For Ex
1) The form contains 4 fields out of which 3 are text fields and the 4th
one is
drop down list.
1) i would like to know how to populate the 3 text fields with data
simultaneously
on selection from the drop down list.
Please Help.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 07
3
Pointer position on keypress event?
Hi.
Is there any straightforward way to tell pointer position (x, y)
upon keypress? In original wxWidgets, wxKeyEvent supports GetX()
and GetY() methods, but wxRuby''s KeyEvent object does not have
one. I also checked with event.methods and event.instance_variables.
Do I need to keep track of pointer position by evt_motion?
--
Taisuke Yamada <tyamadajp@spam.rakugaki.org>,
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='' +
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"
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
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%>
<%
2007 Dec 09
5
capturing arrow keypress on IE7 with Prototype 1.6 doesn't work?
Hi!
does anyone know a fix for this?
in FF and Opera everything is fine, but in IE7 arrow keys are ignored.
thank you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
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