Displaying 20 results from an estimated 26 matches for "onfocuse".
Did you mean:
onfocus
2006 Aug 01
6
Newbie: How to use text_field with Java Script
<input type="text" name="date1" id="dateField1"
onchange="magicDate(''dateField1'');" onfocus="if (this.className !=
''error'') this.select()" />
How could I generate above text filed using ruby?
I am not sure how to give the options such as onchange, onfocus, id and
so on?
could some one please help.
--
2007 Aug 17
3
Clear text_area value onfocus
Hi!
I have a "text_area" that looks like this...
<%= text_area ''business'', ''otherDigitalDesc'', "cols" => 25, "rows" =>
4, "value" => "Enter Description if Yes..." %>
Right now, if I submit it, it adds "Enter Description if Yes" into the
database. It would be nice to not have it enter
2006 Jul 31
4
Login Password text field values
I have a text field that I use for logging in users. Due to the design
of my site, I don''t have room to put the word "username" in front of the
text field so I''d like to actually display it inside the field and then
have the word clear when the user clicks on it.
How could I modify something like this
<%= text_field "user", "login", :size
2006 Jan 02
2
First time class problems
Hi,
I''ve just had my very first attempt of making a JavaScript class,
"prototype" style, so please bare with me, for any disastrous errors :-)
Anyway, I''ve made this class, which is called on an input field on focus:
http://pastebin.com/487417
It works fine in FireFox, but causes some problems in IE. My question is
regarding line 69 in the paste. What is
2005 Nov 10
0
Using multiple inputs with ajax.autocompleter
Hi,
I wrote yesterday (
http://wrath.rubyonrails.org/pipermail/rails-spinoffs/2005-November/001307.h
tml ), but with no replies. This mail is not to spam, just a further
clarification of the problem:
This little bit of code illustrates the problem:
<script language="javascript">
function ac(elm) {
var val = $F(''val'');
new
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects
to the latest element created. Here is what I''m doing.
===========================================
1) Creating an "item" via an action, then rendering the RJS template
2) RJS template looks like this:
page.insert_html :top, ''items'', :partial =>
2006 Apr 02
0
Re: updating the dom - Solution
Easy solution. I am using the behaviour.js package. Using this, the solution
was to apply a Behaviour.apply(); command when the XMLHttpRequest() is
complete. So my solution was to use the form_remote_tag properties to help
me call this like such:
link_to_remote("questions",
:url => { :action => ''curator_questions'', :uid => curator.id,
:tid =>
2006 Aug 30
0
Add html_options to datetime_select?
Why can''t do so something like:
:onfocus => "alert(''hey'');"
For a datetime_select. I tried doing:
:html => {:onfocus => "alert(''hey'')"}
and
:html_options => {:onfocus => "alert(''hey'')"}
any ideas?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 02
3
updating the dom
Hi list,
Say I''ve got a page that lists the students names and grades. Grades are
clickable using a form_remote_tag that then renders a new partial on the
right hand side of the page that then lists the individual test scores for
the particularly student. So far so good.
And lets say in the newly rendered right-hand section, I have another
form_remote_tag that will allow me to input a
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
I have a select_tag in my view that uses options_for_select with
multiple = true. I am having trouble figuring out the Rails way to
create and update that field. Please help.
Models:
-------------
Service has_many AccessControl
AccessControl belongs_to Service
application.rb
-------------------------
$types = Array["Athens", "htpasswd", "IP", "None",
2009 Feb 24
1
How do I clear values from text_field_tag after browser refresh????
Hi all,
I''m having an issue with text_field_tag. I want to reset the value of
the text_field when I refresh my browser, seems like a very simple
thing, however I''m having hard time finding the answer.
After I input some values, how do i reset the value to nil or empty??
my code is below
<%= text_field_tag ''login'', @login, :class =>
2007 May 24
1
How do I show the selected values in options_for_select? Not as simple as it sounds.
How do I show the selected values in options_for_select? I have a
Service model and a AccessControl model. When a user edits a Service I
want the services access_controls to be pre-selected.
Models:
Service has_many AccessControls
AccessControl belongs_to Service
application.rb:
$types = Array["Athens", "htpasswd", "IP", "None", "Other",
2006 Jul 31
6
Popup Calendar and DateBoxEngine and Change Made ...
Community,
I have been putting off implementing a Date selector for too long.
Tonight, I finally put it in. I made the choice to go with the datebox
engine.
Once I got it installed and working, I realized I didn''t like the way it
required you to call it. Example:
<% @dateField = model.date %>
<%= date_box %>
or...
<% @dateField1 = model.date %>
<%=
2006 Apr 25
5
millisecond precision over internet
Hi,
I''m new to programming and ruby and ROR, but I''m hoping to learn ruby to
create custom scientific software.
Mainly it involves measuring people''s reaction time to a series of
words.
I''m positive that this is possible using plain ruby on a computer (cause
this is BASIC territory right?). But I want to create a ROR app that can
do the same thing. My
2008 May 24
3
Searching the wiki
Hi,
If you type a keyword and press Enter in the search field on the wiki, it
does a title-search by default which is very limited.
I tried looking for information about atheros or madwifi and couldn't find
anything. Then I tried ipw2200 (I knew it existed because I created it)
and no results still. I had to ask Ralph to see if the index was old, only
to find out that there is a
2005 Aug 03
1
Scriptaculous: Effects.js SlideDown Firefox Possible Bug
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-firefox.gif
Type: image/gif
Size: 2038 bytes
Desc: not available
Url : http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20050803/0e69c265/bug-firefox.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name:
2006 Jul 02
4
is "label for" better?
I''ve noticed that it is common practise in forms to use:
<label for="tablename","columnname"> ...Some column name</label>
Why is the above construct better than just writting it this way?
<label> Some column name</label>
If there is not compelling reason, I''d prefer to use the second example and
save on typing.
--
Best Regards,
2009 Nov 26
15
bad move? - complex form with *many* observe_field's
I have a pretty complex form with many text fields and a number of
selects. We let the user add multiple types of associated objects to
the parent object and to edit the values for those associated objs, so
the form can have something like the following number of fields on the
page:
9 text fields + 3 selects + a*(1 text + 1 select) + b*(1 text + 1
select) + c*(1 text + 1 select) + d*(1 text +
2008 Jun 18
4
clear search box the first time it's selected
Hi - I''m trying to implement a search box that has a pre-filled
message "enter search text." The first time it''s selected, I''d like
it to clear out, but after that, I''d like it to remain. I imagine
lots of people have done this, any ideas how to accomplish this?
Thanks,
Dino
--~--~---------~--~----~------------~-------~--~----~
You received this
2011 Sep 14
5
rjs error TypeError: element.getElementsByTagName is not a function in rails 3+jquery
hi,
i am using rails 3.0.10
i am trying with sample application for searching data from table and
updating
my search.html.erb file is
<%= form_for (@employee) do |s|%
<div id ="search_details">
<%= s.text_field :name%>
<%= s.text_field :emp_id, :onfocus =>
''sal(document.getElementById(''employee_name'').value);''%>