search for: onfocus

Displaying 20 results from an estimated 26 matches for "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. -- Posted via http://www.ruby-forum.com/.
2007 Aug 17
3
Clear text_area value onfocus
...> 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 this, but if a user clicks on the box, it clears this out. I''m thinking of using onfocus, but my only fear is that if somebody clicks off and then back onto the box, won''t it clear their description? Is there a better/easier way to do this? Thanks, mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google...
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
...attaching" the event to the element? I.e. once it is focused again, the class should fire again. As I said, it works fine, both in FF, but once I clone the object in IE, the new object somehow does not include this class. It does in firefox though. Why is that? I''ve tried alerting the onfocus function, which has a "function anonymous() {}" around the original function, could this be the problem? And if so, how could it be solved? Thanks in advance for your attention to this matter. Best Regards Michael. _____ Jeg beskyttes af den gratis SPAMfighter til...
2005 Nov 10
0
Using multiple inputs with ajax.autocompleter
...ion> <option value="type2">Type 2</option> <option value="type3">Type 3</option> <option value="type4">Type 4</option> <option value="type5">Type 5</option> </select> <input onfocus="ac(this);" /> <input onfocus="ac(this);" /> <input onfocus="ac(this);" /> <input onfocus="ac(this);" /> If "val" is set to "type1", it queres the server for "type 1" suggestions (A basic sql lookup),...
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
...e 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 new grade for that student. > I''d like to set an onfocus event for that text input field that > element.shows another div (that displays a help message, lets say). > > The problem I am having is that I can''t get the onfocus event to work > because -- since the field is contained in a newly rendered div that wasn''t > prese...
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.rub...
2006 Apr 02
3
updating the dom
...al 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 new grade for that student. I''d like to set an onfocus event for that text input field that element.shows another div (that displays a help message, lets say). The problem I am having is that I can''t get the onfocus event to work because -- since the field is contained in a newly rendered div that wasn''t present when the page first l...
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
...e"><span class = "required">*</ span>Access Control:</label> <%=select_tag ''access_control[]'', options_for_select($types, ''@types''), {:multiple => true, :size => 5, :id => "access_control_value", :onfocus=>"fixedtooltip(CONTROL_MSSG, this, event, '''')", :onblur=>"delayhidetip()"}%> <%= error_message_on :service, :access_controls %><br /> Controller -------------- #create works but is this the best way? def create ..... if params[:access_cont...
2009 Feb 24
1
How do I clear values from text_field_tag after browser refresh????
...ng 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 => "input-text", :onblur => "loginFieldOnBlur(''login'')", :onfocus => "loginFieldOnFocus(''login'')" %> Any help or tip will be greatly appreciated. I tried removing @login from text tag, setting @login to null or empty..setting params[:login] to an empty string in my session controller...but nothing seems to be working.. T...
2007 May 24
1
How do I show the selected values in options_for_select? Not as simple as it sounds.
...access_control_value"><span class = "required">*</ span>Access Control:</label> <%=select_tag ''access_control[]'', options_for_select($types, @types), {:multiple => true, :size => 5, :id => "access_control_value", :onfocus=>"fixedtooltip(CONTROL_MSSG, this, event, '''')", :onblur=>"delayhidetip()"}%> <%= error_message_on :service, :access_controls %><br /> But when I edit a Service with access_controls, nothing is pre- selected. What am I doing wrong? Please...
2006 Jul 31
6
Popup Calendar and DateBoxEngine and Change Made ...
...;li>#{engine_image(''icon-help.gif'', :engine => ''datebox'', :alt => ''Help'', :id => calendar_ref + ''Help'' ) }</li> <li>#{text_field object_name, method, { :onChange => "magicDate(id);", :onFocus => "if (this.className != ''error'') this.select()"} }</li> <li>#{engine_image(''icon-calendar.gif'', :engine => ''datebox'', :alt => ''Calendar'', :id => calendar_ref + ''Button'',...
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);''%> </div> <% end %> when i click tab it calls sal() jquery function and i sent the data to action, in action parameter is processed well, but while replacing div with partial page i am ge...